Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

sorting the characters in a String in 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

PREVIOUS NEXT
Code Example
Java :: android string java 
Java :: android studio go to another activity kotlin 
Java :: make frame visible java 
Java :: java convert LocalDateTime to long 
Java :: android date time 
Java :: java loop through object 
Java :: inline arraylist initialization java 
Java :: change button text onclick javca 
Java :: pass list to intent in android java 
Java :: qr code generator in java 
Java :: how to make a string lowercase in java 
Java :: start fragment from activity 
Java :: vscode java.home path 
Java :: java stream min 
Java :: swing button 
Java :: select in selenium java 
Java :: how to import math lib in java 
Java :: get average of all the array items android 
Java :: Java, how to compare Strings with String Arrays 
Java :: Validation failed for query for method public abstract java.util.List 
Java :: intent flag clear task 
Java :: java list distinct by attribute 
Java :: getcurrencyinstance java example 
Java :: how to initialize bigdecimal in java 
Java :: implementing iterator for linked list java 
Java :: priority scheduling in java 
Java :: Java Create a ConcurrentHashMap 
Java :: spring boot save file to static folder 
Java :: remove first and last character from string in java 
Java :: uppercase java 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =