Skip to content Skip to sidebar Skip to footer

How To Check Two Array List Are Same Content In Same Position

How to check value and its position are same in 2 array list wi?. Example: //These should be not equal. ArrayList listA = {'a', 'b', 'c'} ArrayList list

Solution 1:

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.


Post a Comment for "How To Check Two Array List Are Same Content In Same Position"