Class hierarchy of AbstractMap is as follows "AbstractMap implements Map"Class hierarchy of HashMap is as follows "HashMap extends AbstractMap implements Map"When AbstractMap implements Map interface and AbstractMap is extended by HashMap, what is the use of again implementing Map interface in the declaration of HashMap?.

Showing Answers 1 - 4 of 4 Answers

neelam

  • Jul 4th, 2006
 

This is because AbstractMap is the abstract class and not all methods from Map interface are implemented in AbstractMap. Hence HashMap implements Map interface to implement of the metods in Map interface.

  Was this answer useful?  Yes

When you create a concrete class, all the features of abstract classes & interfaces extended earlier have to be implemented, if not already done so..so that purpose of implementing an hashmap again doesnt really suffice the need..please let me know too..

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions