posted 20 years ago
You have three views which are Collections you can iterate through: keySet(), values(), and entrySet(). Many people do somethign like this:
However, this is a big waste of time, performaing a get() on every singe key, which includes a hashCode() calculation. Completely unnecessary. If you want to get both keys and values, do something like:
If you really only need the keys, use keySet(); if you only need values, use values(); if you need both, use entrySet().
"I'm not back." - Bill Harding, Twister