How to check two array list are same content in same position

use

return listA.equals(listB);

Returns true if and only if the specified object is also a list, both
lists have the same size, and all corresponding pairs of elements in
the two lists are equal.

Leave a Comment