Fascinating newbie question: I'm loading a HashMap like this:
Then I'm trying to do:
String justMyKeys= (String) myMap.keySet().toArray();
And I'm getting a classcast exception. I have this tingly feeling like I almost understand. But not quite.
I know the "keySet" is just half a collection of Objects. But if all I put in there is Strings, why can't I cast it to String?