Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
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: 8898
5
  • 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