• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can either TreeSet OR HashSet contain null values ?

 
sarim raza
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks
 
Sivaram Ghorakavi
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic