• Post Reply Bookmark Topic Watch Topic
  • New Topic

Collections  RSS feed

 
Bharat Chatla
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why map is defined a separate interface from the collection interface in Collections Framework?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The structure of a Map is different from that of the other collections. A map is a collection but technically speaking Map is not a collection since it does not inherit from the Collection interface. Some methods may not make sense for Maps like add(Object o). This is because of the <Key,Value> structure of Maps.
 
Bharat Chatla
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you John
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!