Computer Science, asked by krhwbdhgifj, 6 months ago

Program to understand similarity between array and object in java.​

Answers

Answered by Anonymous
3

Answer:

class Test

{

public static void main (String[] args)

{

int arr1[] = {1, 2, 3};

int arr2[] = {1, 2, 3};

if (arr1 == arr2) // Same as arr1.equals(arr2)

System.out.println("Same");

else

System.out.println("Not same");

}

}

Answered by Anonymous
1

\huge{\underline{\underline{\boxed{\sf{\purple{Answer  ࿐}}}}}}

Object − Objects have states and behaviours. Example: A dog has states - color, name, breed as well as behaviours.

Similar questions