Originally posted by Jim Yingst:
Errr... why make a HashSet at all? You've already got a perfectly good Set - why spend processor time to make another? Just use
Set nSet = hm.keySet();
Ok, this is great. However, I have another question then...
I thought an interface was simply a definition, and didn't have any functionality behind it. I would have never thought to even try this. In the API documentation Set is an interface. So, can you explain why using Set works in this case? Is this a feature of the Util package, or am I missing something about interfaces in general?
Thanks for the help.
- Rob