Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ordering of AlphaNumeric In Ascending Order

 
anandmindmill rai
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
have a look at Comparator and Comparable interfaces.

how do you sort them now ?

p
 
Grant Gainey
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not crossposting would be nice too:

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

Grant
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic