How to do ascending order for string name | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

How to do ascending order for string name

3rd Feb 2019, 2:44 AM
Malvin Michael
Malvin Michael - avatar
2 Respostas
+ 5
String s="kdaaeg"; char[] ch=s.toCharArray(); //this would convert the string to character array Arrays.sort(ch); //this would sort the character array in ascending order I guess you were asking this.
3rd Feb 2019, 8:35 AM
Himani
+ 2
Can you please explain your question more? I donā€™t understand.
3rd Feb 2019, 5:03 AM
Rowsej
Rowsej - avatar