Hi everyone,
In the lab 1016, 3.1 build and run a simple application that uses HashMap, and 
part 4 of this segment advise us to do our own exercise : please do the 
following .... display them in both unsorted and sorted order. 
I did the unsorted order and it goes well, but I have a problem with the 
unsorted order, I got an execption : java.lang.ClassCastException.
I use putAll() method like that : 

Map tm = new TreeMap();
        tm.putAll(m);  
And then display tm.

I have looked at the JavaDoc about this exception for putAll but I don't really 
understand  what it means :     
ClassCastException - if the class of a key or value in the specified map 
prevents it from being stored in this map
Please, help.
Thanks in advance.
Bako



      
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to