What is Java's Set Interface?
By jeanjiang
@jeanjiang (30)
China
May 10, 2011 4:54am CST
What are implemented Classes of Set Interface? What about addming elements, removing elements and other usage of it?
2 responses
@naveend (19)
• India
22 Jul 11
Set is an Interface that stores only unique values and does not allow null values. Following are the methods to add elements, Remove elements etc.
Add :- add();
remove all elements:- clear();
remove one specific elements:- remove();
display the size of the set:- size();
Show the contents of the set:- contains();
Returns an iterator object:- iterator();