When im using an ArrayList
ArrayList<item> List = new ArrayList<item>();
Item a = new Item(1,"Book");
Item b = new Item(2,"Shoes");
List.add(a);
List.add(b);
Item c = new Item(1,"Book");
if(List.equals(c)) //Will this code return true?
if not, can anyone tell in what case List.equals(c) will return true. Because an item can have many attributes, id, name, price. Does it check for the reference name ? or compare the attributes.