1, remove (int index); //Delete the element at the specified position
2, remove (Object o); //Delete the specified object and examine the rules for deleting objects?
3, RemoveAll (Collection col);//delete all elements in the specified collection.
4, contains (Object O); //Whether it contains
5, contains (Collection col);//Whether the collection is included.
---------------------------------------------------------------------------------
List coll=new ArrayList ();
Coll.add (New String ("Asdads"));
Coll.add (New String ("ASD"));
Coll.add (10);
if (Coll.contains ("Asdads")) {
Coll.remove ("Asdads"); Containers are iteratable when objects are deleted, the objects in the container are traversed, the Equals method of each object is called, and the reference to the object is deleted if the same
}
Collection coll2=new ArrayList ();
Coll2.add (10);
if (Coll.contains (COLL2))
Coll.removeall (coll);
It 18 Palm Job _java Foundation Day _ Collection