This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes How to sort a String Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to sort a String" Watch "How to sort a String" New topic
Author

How to sort a String

Anjali S Sharma
Ranch Hand

Joined: Jun 29, 2005
Posts: 279
How can i sort a String?
Say I have a String "dcab". I want to sort it to "abcd".

Please give me pointers in this regard.
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 979
A string is internally a char[]...
Anjali S Sharma
Ranch Hand

Joined: Jun 29, 2005
Posts: 279
Originally posted by A Kumar:
A string is internally a char[]...


Thanks a lot. Its working now.
Ariel Ortiz
Ranch Hand

Joined: May 14, 2004
Posts: 121


...Ariel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to sort a String