+ 2

How sort a string in java

How sort a string in java

17th Feb 2018, 4:14 AM
King Moghol
King Moghol - avatar
1 Answer
0
String str="sololearn"; char []charArray = str.toCharArray(); Arrays.sort(charArray); String sorted = new String(charArray); System.out.println(sorted);
17th Feb 2018, 6:12 AM
Ravi Chandra Enaganti
Ravi Chandra Enaganti - avatar