This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what does entrySet return??

 
yuvraj kotegar
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it returns a set.

so does it contain both the 'key' and 'value' in case of hashmap??
 
Jelle Klap
Bartender
Posts: 1951
7
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you take a look at the API documentation for the Map.entrySet() method it should be pretty obvious what exactly is returned.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33694
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yuvraj,
Yes. The JavaDoc for Java 5+ shows this a bit more clearly. It says the return type is:
Set<Map.Entry<K,V>>

This is a Set of Entry objects. The Entry class is defined within Map and has the key/value pairs.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic