To obtain the fields from two objects in an ArrayList so that they can be compared:

// get field1 from one object
myArrayList.get( index1 ).getField1();

// get field 1 from another object in...