1import java.util.Arrays;
2class Test
3{
4 public static void main (String[] args)
5 {
6 // inarr1 and inarr2 have same values
7 int inarr1[] = {1, 2, 3};
8 int inarr2[] = {1, 2, 3};
9 Object[] arr1 = {inarr1}; // arr1 contains only one element
10 Object[] arr2 = {inarr2}; // arr2 also contains only one element
11 if (Arrays.equals(arr1, arr2))
12 System.out.println("Same");
13 else
14 System.out.println("Not same");
15 }
16}