File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes Sorting hashtable in j2me Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Sorting hashtable in j2me" Watch "Sorting hashtable in j2me" New topic

Sorting hashtable in j2me

Dushyant Chhetri
Ranch Hand

Joined: Oct 28, 2009
Posts: 75

How can I sort a hashtable in J2ME? There is no comparator that can be used.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

You can't actually sort a hashtable - a hashtable is not a linear structure. However you can create a list of entries contained in a hashtable and sort the list. You just have to do it the old-fashioned way and code it all yourself.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Sorting hashtable in j2me
It's not a secret anymore!