This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Sorting hashtable in j2me" Watch "Sorting hashtable in j2me" New topic
Author

Sorting hashtable in j2me

Dushyant Chhetri
Ranch Hand

Joined: Oct 28, 2009
Posts: 75
Hi,

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: 15628
    
  15

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sorting hashtable in j2me
 
Similar Threads
How do i start on my J2ME
J2ME
Any way to accomplish this ?
Hashtable vs. HashMap
Passing my object to one to other activity