Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tricky questions in collection?

 
santhosh.R gowda
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all

Please tell me some tricky questions in collections so that i can test myself
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
List at least three interfaces of the Java Collection Framework. (except the Collection interface)
One of the three interfaces must not extend the Collection interface.
 
santhosh.R gowda
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Observer
2. Enumeration
3. Iterator

 
Rahul P Kumar
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do they all belong to collection framework ? what does Observer interface does?
 
santhosh.R gowda
Ranch Hand
Posts: 296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry now i thought that
1)Map
2)SortedMap
3)NavigableMap

Please let me know any others..?
 
Rahul P Kumar
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
are the current list of interfaces linked somehow? Christophe, are listing subinterfaces counts in?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rahul.p Kumar wrote:Christophe, are listing subinterfaces counts in?

Well yes. I would have been more satisfied with something like Map, List, Set, but I'm the one to blame for not being specific enough.
 
Rahul P Kumar
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well then. Santosh, how you will create a map class which does neither accept null keys nor synchronized ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic