PPT Slide
Method Summary for Interface Collection - Continued
boolean retainAll(Collection c) Retains only the elements in this collection that are contained in the specified collection (optional operation).
int size() Returns the number of elements in this collection.
Object[] toArray() Returns an array containing all of the elements in this collection. Object[] toArray(Object[] a) Returns an array containing all of the elements in this collection whose runtime type is that of the specified array.