Check out example codes for "java check equality of two lists". It will help you in understanding the concepts better.

Code Example 1

Objects.equals(list1, list2)
//for arrays this is Arrays.equals(arr1,arr2)

Learn ReactJs, React Native from akashmittal.com