• Post Reply Bookmark Topic Watch Topic
  • New Topic

HashMap  RSS feed

 
raghuram bikkani
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can u implement HashMap if u don't have a HashMap?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66153
146
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HashMap is not an interface, so you cannot implement it. Do you mean java.util.Map?
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't understand your question. HashMap is a concrete class, so you can create objects from it:

Does this help?

Layne
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess that he wants to mimic the behavious of HashMap.
By 'implement' he means 'create'.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16007
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by raghuram bikkani:
How can u implement HashMap if u don't have a HashMap?

What do you mean? If you have a REALLY OLD version of Java that doesn't have HashMap, you can use java.util.Hashtable.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!