Search
 
SCRIPT & CODE EXAMPLE
 

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);
    }
}
Comment

sort a string array java

String[] myArray = {"JavaFX", "HBase", "OpenCV", "Java", "Hadoop","Neo4j"};
Arrays.sort(myArray);
System.out.println(Arrays.toString(myArray));
Comment

PREVIOUS NEXT
Code Example
Java :: java biginteger multiply 
Java :: how to delete a object in java 
Java :: java if one sting on array match 
Java :: Get the SUM of integers in List JAVA 
Java :: no main manifest attribute java 
Java :: get logged-in user in Spring Security 
Java :: isnumber java 
Java :: switch activity android studi 
Java :: java math.random 
Java :: arrays.fill java 
Java :: hanoi tower java 
Java :: getconstructor java 
Java :: java system.out.print two dimensional array 
Java :: java int array 
Java :: How to add music to andoid project 
Java :: loop will array length java example 
Java :: java print array as string 
Java :: byte to bufferedimage java 
Java :: how to generate random number in java 
Java :: how to read a json file in java 
Java :: how to convert arraylist to array in java 
Java :: how to change image resolution in android programmatically 
Java :: sorting the characters in a String in java 
Java :: Java List Sort Using sort() method 
Java :: spring h2 database example 
Java :: inputstream to string java 
Java :: slice a list java 
Java :: javafx tableview add data 
Java :: java list contains object with property 
Java :: upload converted base64 to image object to oss without saving in java 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =