This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes K&B Book Error? 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 "K&B Book Error?" Watch "K&B Book Error?" New topic

K&B Book Error?

Jon Lee
Ranch Hand

Joined: Mar 04, 2005
Posts: 134
In chapter 7, the book states

But I think LinkedHashSets are ordered collections...Am I right?

SCJP 5.0 - 98% (2007)<br />SCWCD 1.4 - 97% (2007)
Gowher Naik
Ranch Hand

Joined: Feb 07, 2005
Posts: 643
HashSet do not guarantee any ordering
But LinkedHashSet is ordered set.
Jon Lee
Ranch Hand

Joined: Mar 04, 2005
Posts: 134
Yes, that what I think.

It is probably an error in K&B's book...
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
Yes, Check here.
It is sorta covered in the JavaRanch Style Guide.
subject: K&B Book Error?
It's not a secret anymore!