This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes can either TreeSet OR HashSet contain null values ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "can either TreeSet OR HashSet contain null values ?" Watch "can either TreeSet OR HashSet contain null values ?" New topic
Author

can either TreeSet OR HashSet contain null values ?

sarim raza
Ranch Hand

Joined: Nov 02, 2000
Posts: 232
thanks
Sivaram Ghorakavi
Ranch Hand

Joined: Nov 30, 2000
Posts: 56
Yes. You can add(null) on both TreeSet and HashSet.
Check your self from JDK and try writing some code before posting this kind of questions. But it's good to let the public know.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can either TreeSet OR HashSet contain null values ?
 
jQuery in Action, 3rd edition