• Post Reply Bookmark Topic Watch Topic
  • New Topic

Set duplicates  RSS feed

 
santosh gunake
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How a set will come to know about the existance of an object.
for e.g -
Set set = new HashSet();
set.add(e1); return true
set.add(e2); return true

set.add(e1); return false
How the set will check for existance of e1;

Thankx
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
santosh,
are you sure this is a "EJB and Other Java EE Technologies" related FAQ ?
Maybe you should try your luck at the "Java Beginner" forum.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!