Thursday, October 16, 2008
Java sort() Method Example
import java.util.*;
import java.io.*;
import java.lang.String;
public class sortstr{
public static void main(String args[]){
String str = "Java String Example";
char[] content = str.toCharArray();
java.util.Arrays.sort(content);
String sorted = new String(content);
System.out.println(content);
}
}
Result : EJSaaegilmnprtvx
Subscribe to:
Post Comments (Atom)
7 comments:
hey thanks for all the information about Java. I am not much, actually not at all aware about the Java. Can you tell me what are the basic things should be known by me in prior to learn Java completely.??? I want to learn Java..
Derek Thank you for the coding. This is really helpful for me to start with.
I am glad I checked out your site it's really cool. Thanks!
Dear Bhai my email was hacked so I can't get in touch with you. Tried digital point but you are not there anymore if you can please send me email here yanjiaren8@gmail.com as soon as you can, your didi
Hey Guys,
Thank you for the example. I love Java.
Ladies Shoes
Very nice information on java.
==> Cheap used cars for sale
Wow... It was great, I will save this post that will be helpful to learn java. thanks for it
Semi trucks for sale
Peterbilt trucks for sale
Post a Comment