I have a question regarding to remove method in arraylist in java, for example:
....
ArrayList<Array>list=new ArrayList<Array>();
Array a=new Array (1,2,3);
Array b=new Array (4,5,6);
Array c=new Array (7,8,9);
list.add(a);
list.add(b);
list.add(c);
....
My question is, if I want to remove object b from the arraylist, should I use list.remove(1) or list.remove(b)? In another way, should I use object or index for the parameter in the remove method in this case?