anybody know an efficient way to decide if two arraylists contain the same values?
Code:
ArrayList<String> dummy1= new ArrayList<String>();
list1.put("foo");
list1.put("baa");
ArrayList<String> dummy2= new ArrayList<String>();
list1.put("baa");
list1.put("foo");
dummy1 == dummy2
the challenge is that the arraylists has not the same value order..
(foo, baa) == (foo, baa) // per definition :)
i need to get this
(foo, baa) == (baa, foo) // true
so what would be your approach?