Hello :)
I've been trying to compare to array lists with the following code:
final VideoObj v1 = new VideoObj( "A", 2000, "B" );
final VideoObj v2 = new VideoObj( "B", 2000, "B" );
ArrayList<Record> list = new ArrayList<Record>();
list.add(new Record(v1,1,0,0));
list.add(new Record(v2,3,0,0));
ArrayList<Record> list3 = new ArrayList<Record>();
list3.add(new Record(v1,1,0,0));
list3.add(new Record(v2,3,0,0));
if (list.containsAll(list3))
System.out.println("equal");
else
System.out.println("not equal");
The code gives "not equal" all the times, and the data is exactly the same..
Does any body know how I can compare 2 array lists?
any idea will be highly appreciated!