Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

HashMap Doubt  RSS feed

 
Ranch Hand
Posts: 1087
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Marshal
Posts: 62199
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 1087
Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Bartender
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Campbell Ritchie
Marshal
Posts: 62199
193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
sunglasses are a type of coolness prosthetic. Check out the sunglasses on this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!