wood burning stoves 2.0*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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.
 
Don't get me started about those stupid light bulbs.
 
subject: can either TreeSet OR HashSet contain null values ?