aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes LinkedHashSet subset of HashSet ?? (K&B bk shows otherwise) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "LinkedHashSet subset of HashSet ?? (K&B bk shows otherwise)" Watch "LinkedHashSet subset of HashSet ?? (K&B bk shows otherwise)" New topic
Author

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

Vishy Karl
Ranch Hand

Joined: Sep 08, 2003
Posts: 116
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,


"The man who can drive himself further once the effort gets painful is the man who will win." <br />Roger Bannister
Philippe Maquet
Bartender

Joined: Jun 02, 2003
Posts: 1872
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

Joined: Oct 14, 2002
Posts: 8764
    
    5
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 ]

Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: LinkedHashSet subset of HashSet ?? (K&B bk shows otherwise)
 
Similar Threads
LinkedHashMap and HashMap
instanceof operator
Map Question
Aren't Collection and AbstractMap peers? what's the common subclass?
Collecion question