0

I need to compare two list of objects irrespective of the order

Example:

List1 = { object1, object2, object3, object4 }
List2 = { object4, object1, object2, object3 }

compare(List1, List2) should return true.

Sweety Bertilla
  • 972
  • 10
  • 35

1 Answers1

0

Here is simple example for compare two lists in Java,

http://beginnersbook.com/2013/12/how-to-compare-two-arraylist-in-java/

How to compare two different list object in java?

Community
  • 1
  • 1
stacktry
  • 324
  • 3
  • 24
  • This is not the answer I am looking for, it mentions to search a common field. In i position when I compare object1 with object4 its going to return false. I need more like, List A i position Object1 is available in list B – Sweety Bertilla Dec 08 '14 at 14:43