aspose file tools*
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 Spring in Action this week in the Spring 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