• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HashMap

 
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
Pie
Posts: 65118
89
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
Saloon Keeper
Posts: 15441
41
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