Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "K&B Book Error?" Watch "K&B Book Error?" New topic
Author

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?
 
Similar Threads
is LinkedHashSet ordered?
K&B SCJP 5 Study Guide p 562
may be errata.....
HashSet and LinkedHashSet
About iteration order of different data structure