This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes K&B book linkedhashset??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "K&B book linkedhashset???" Watch "K&B book linkedhashset???" New topic

K&B book linkedhashset???

Deep Chand
Ranch Hand

Joined: Dec 17, 2002
Posts: 133
K&B book says that LinkedHashSet can be used as LRU cache as you can specify whether it should preserve the order of insertion or order of last access. However the Java 1.4 API doesn't say so? Java 1.4 API says that only the LinkedHashMap can be used as LRU because there you can specify the order we want (insertion/last access)?
Am I correct?
Bert Bates

Joined: Oct 14, 2002
Posts: 8898
Deep -
Yup - it's a known error - this will be listed on the updated errata page, sorry.

Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
I agree. Here's the link:
subject: K&B book linkedhashset???
It's not a secret anymore!