1) if I set
int[] set1 = new int[]{1, 2};
int[] set2 = new int[]{1, 2};
how come when I pass them as strings using
System.out.println(Arrays.toString(set1) == Arrays.toString(set2));
it returns false?
2) Is there any way to compare equality of entire arrays without looping through each index of the array?