Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unique values from a Map

 
Srikanth Reddytr
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to get Unique values which are stroed in a Map
 
Arjun Karthick
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
get all the values from the map using Values() and store it in a set.Set does not allow to store duplicate value in it. So your objective is satisfied.
 
Srikanth Reddytr
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ThanQ Arjun, I implemented in that way works fine
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic