my dog learned polymorphism*
The moose likes Beginning Java and the fly likes HashMap 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" Watch "HashMap" New topic
Author

HashMap

raghuram bikkani
Greenhorn

Joined: Jan 18, 2006
Posts: 16
How can u implement HashMap if u don't have a HashMap?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61433
    
  67

HashMap is not an interface, so you cannot implement it. Do you mean java.util.Map?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Layne Lund
Ranch Hand

Joined: Dec 06, 2001
Posts: 3061
I don't understand your question. HashMap is a concrete class, so you can create objects from it:

Does this help?

Layne


Java API Documentation
The Java Tutorial
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

I guess that he wants to mimic the behavious of HashMap.
By 'implement' he means 'create'.


[My Blog]
All roads lead to JavaRanch
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14270
    
  21

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.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HashMap