A collection that contains no duplicate elements. More formally, sets contain no pair of elements e1 and e2 such that e1.equals(e2), and at most one null element. As implied by its name, this interface models the mathematical set abstraction.
The above quote is from API specification regarding interface set. From that we can conclude the answer to your question depends on the defination of "unique", interface set just guarantees that e1 and e2 would not both appeared in the collection if e1.equals(e2) return true. Hope that helps James [This message has been edited by James Du (edited May 08, 2001).]
Hi Fraternity, The answer to your specific question is TRUE , the reason is that Set interface is implimented by HashSet class so, all the properties of Set are inheritted by the HashSet and it must deliver the contract of Set interface . The contract of Set interface is correctly quoted by James, so I am not quoting the same for want of space. However, you may want to see the entire discription of the same in the API. Hope this clears your doubt. Ravindra Mohan. [This message has been edited by Ravindra Mohan (edited May 08, 2001).]