• Post Reply Bookmark Topic Watch Topic
  • New Topic

Interesting Problem?

Sumeet Gaikwad
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Here is my method

public java.util.List sortHashKeys(java.util.Hashtable hash){
java.util.List l = new java.util.ArrayList();
java.util.Enumeration enum = hash.keys();
return l;

If I use this method in another class (which is not Applet) it works fine.
But if I use this method in the Applet it gives me ClassCastException.
If I comment the Line

then it works without exception.
I am not getting what the problem using theCollections.sort(l); method in Applet.
Any clues??
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!