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