This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread 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 Android Security Essentials Live Lessons this week in the Android 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
 
Consider Paul's rocket mass heater.
 
subject: How to sort a String
 
Similar Threads
a question in stacks
Anagrams
How to sort String, for example: abced. to change to abcde
Sorting an Array
hyperlinking