File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 ?