"It`s important to know that the order of objects printed in the second for loop is not predictible: HahSets and LinkedHashSets do not guarantee any ordering."
I think there may be a mistake, because LinkedHashSet is an ordered Set and remembers the order in which the elements were inserted.
I agree with you.I have used LinkedHashMap (not Set, but I assume they should behave the same) to preserve the result set in the same order as that of the 'n' no. of search keys entered by the user.
I just found this one yesterday and posted it as well. Check out the tread "JavaRanch Exclusive! temporary K&B 5 errata", where you'll find various errors posted.
SCJP1.4, SCJP1.5
First, you drop a couch from the plane, THEN you surf it. Here, take this tiny ad with you:
a bit of art, as a gift, the permaculture playing cards