• Post Reply Bookmark Topic Watch Topic
  • New Topic

Sorting of Number.  RSS feed

 
Adam
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai,

I got to sort a number with comma as seperator.(ex:10,123).I am able to sort the remaining numbers.So,Please suggest me a solution how to sort those numbers or how to remove that comma sort the remaining numbers.

Thanking you,
Adam.
 
Campbell Ritchie
Sheriff
Posts: 55351
157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.

Please change you name; remember first and last name. And why are you posting in Swing?

What format are your numbers in? Are they a comma-separated list in the code? In which case they will form part of an array.
Are you reading from a text file? In which case they will come in as a String which can be split using the usual techniques (see StringTokenizer, String.split(), etc).

CR
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!