wood burning stoves 2.0*
The moose likes Java in General and the fly likes Ordering of AlphaNumeric In Ascending Order Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Ordering of AlphaNumeric In Ascending Order" Watch "Ordering of AlphaNumeric In Ascending Order" New topic
Author

Ordering of AlphaNumeric In Ascending Order

anandmindmill rai
Greenhorn

Joined: Apr 12, 2006
Posts: 3
I have data with mix number of digits and I like to sort them. Somehow, the
normal sorting process give me a not so desired result. Can anyone help?
Its very Impotant for me.
A10
B100
A2
AA1
AD200
32
11
A1
The result I am looking for is:
A1
A2
A10
B2
B100
AD200
11
32


Thanks and Regards:
Anand
pascal betz
Ranch Hand

Joined: Jun 19, 2001
Posts: 547
have a look at Comparator and Comparable interfaces.

how do you sort them now ?

p
Grant Gainey
Ranch Hand

Joined: Oct 16, 2005
Posts: 65
Not crossposting would be nice too:

http://www.coderanch.com/t/328108/java/java/Ordering-AlphaNumeric-No-ascending-Order

Grant


In Theory, there is no difference between theory and practice.<br />In Practice, there is no relationship between theory and practice.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Ordering of AlphaNumeric In Ascending Order
 
Similar Threads
Ordering of AlphaNumeric No. in ascending Order
Ordering Of Alphanumeric no in ascending Order
Garbage collection
Read file from directory, update contents of the each file
Java - Collection of Objects