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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply 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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: can either TreeSet OR HashSet contain null values ?