Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This compliant solution compares the content of two arrays using the two-argument Arrays.equals() method.:

Code Block
bgColor#ccccff
int[] arr1 = new int[20]; // initializedInitialized to 0
int[] arr2 = new int[20]; // initializedInitialized to 0
System.out.println(Arrays.equals(arr1, arr2)); // printsPrints true

Compliant Solution

This compliant solution compares the array references using the reference equality operators ==:

...