This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

LinkedHashSet subset of HashSet ?? (K&B bk shows otherwise)  RSS feed

 
Vishy Karl
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
Dan's Q

Answer is h. ie. given as LinkedHashSet is subclass of HashSet.
But in K&B BK. pg. 422 in the collection hierarchy diagram both HashSet and LinkedHashSet are shown derived from Set. So is the diagram wrong ?? (It should have shown the LinkedHashSet as subclass of HashSet)
Kindly confirm.
Thanks,
 
Philippe Maquet
Bartender
Posts: 1872
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vishy,
You're correct. Now that class and interface hierarchy chart looks simplified anyway, probably on purpose, as AbstractSet and AbstractCollection are missing.
Regards,
Phil.
[ January 31, 2004: Message edited by: Philippe Maquet ]
 
Bert Bates
author
Sheriff
Posts: 8945
17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the diagram is correct, but, on purpose, we only included those interfaces, classes, and relationships that are included in the exam. Should I be embarrassed yet again ? The important concepts for the exam are about Sets, Lists, and Maps, that's what we focused on...
[ January 31, 2004: Message edited by: Bert Bates ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!