aspose file tools*
The moose likes Beginning Java and the fly likes HashMap Doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "HashMap Doubt" Watch "HashMap Doubt" New topic
Author

HashMap Doubt

Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055



http://www.lifesbizzare.blogspot.com || OCJP:81%
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39409
    
  28
Vishal Hegde wrote: // here does entrySet adds all its items in a SET?
Not quite sure I understand your question.
The entrySet method creates a Set with all the entries in.
// Is Entry some static variable that adds the elements of set in a Map
No. It is an interface nested inside the Map interface.

Your post would be easier to understand if you wrote the questions outside the code tags.
Why have you not given the Map type parameters? It would be a lot easier to handle a Map<String, Integer>.
Vishal Hegde
Ranch Hand

Joined: Aug 01, 2009
Posts: 1055

No. It is an interface nested inside the Map interface..

Interface can be nested??

By that you mean is-a relationship ,right using extends keyword?
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

No it's just an interface defined in another interface.

// Edit: Just to clarify. My no is the answer to the question: By that you mean is-a relationship ,right using extends keyword?


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39409
    
  28
Vishal Hegde wrote: . . . Interface can be nested??
Yes. Open the src.zip file in your Java™ installation folder and you can see how it is done
. . . By that you mean is-a relationship ,right using extends keyword?
No. Not at all.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HashMap Doubt