• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Collection (da Interface) question and possible errata item in K&B SCJP5

 
Peter Gade Christensen
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So doesn't LinkedHashSet extend HashSet and LinkedHashMap extend HashMap which would mean the Figure on page 538 needs to change...

The figure has HashSet and LinkedHashSet extending Set and HashMap and LinkedHashMap extending Map ??

Biodiesel does Rock!!
 
Burkhard Hassel
Ranch Hand
Posts: 1274
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter Gade Christensen wrote
So doesn't LinkedHashSet extend HashSet and LinkedHashMap extend HashMap which would mean the Figure on page 538 needs to change...



Yes, the biggest errata in the book.


and Peter wrote also
The figure has HashSet and LinkedHashSet extending Set and HashMap and LinkedHashMap extending Map ??


No, the figure has it implementing them, which is false as well (ok, they implement them indirectily via extending the classes mentioned above).


Yours,
Bu.
 
Peter Gade Christensen
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
bump - just to make sure Bert sees this
 
Bert Bates
author
Sheriff
Posts: 8900
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter -

I'm on the road for a few days and I don't have the book with me - is this issue different to the errata already listed for this page?

thanks,

Bert
 
Peter Gade Christensen
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bert: I am honored to talk to you - what a great book ! (Both Head First Java and your SCJP guide) ...


Yes its a little different the errata says...
"538....bug.......In figure, LinkedHashMap s/b a subclass of HashMap"
but makes no mention of LinkedHashSet being a subclass of HashSet

Thanks!
 
Bert Bates
author
Sheriff
Posts: 8900
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Peter,

I'll add this to the list - argh, I must have been asleep that day

We're glad to hear you're enjoying the book - especially given what a sharp eye you have

Bert
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic