Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about Hashset

 
Nilesh Shekokar
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hashtmap allows one null key and multiple null values
Hashtable cant allow anything that is null

and

It is given in the Enthuware simulator that
Hashset can allow null values!!!
is it correct??
 
Arno Reper
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

From the source...
Here is the add method

the map is a

I hope this will help you understanding how HashSet works
arno
PS: reading the source is very usefull to learn how its made
=> www.docjar.com
 
Arno Reper
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe you also wanna see the put method from HashMap


arno
 
Arno Reper
Ranch Hand
Posts: 286
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did it help you a bit?
arno
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic