Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

sort string java

import java.util.Arrays;

public class Test
{
    public static void main(String[] args)
    {
        String original = "edcba";
        char[] chars = original.toCharArray();
        Arrays.sort(chars);
        String sorted = new String(chars);
        System.out.println(sorted);
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sort #string #java
ADD COMMENT
Topic
Name
7+8 =