There is an array of characters in Java, for example:

char[] arr = {'a', 'f', 'q', 'b'}; 

How to sort it?

  • one
    @ Igor Bondarenko if you were given the correct answer, mark it with the correct (tick) for those who see this topic in the future. - Denis

1 answer 1

 import java.util.Arrays; public class ArrayDemo { public static void main(String[] args) { char cArr[] = {'r','q','s','p'}; Arrays.sort(cArr); } 
  • I'm a newbie. Thanks to everyone, now I know) - Igor Bondarenko
  • one
    We do not have to send to the search engines and especially lmgtfy. Links from there lead back to SO. - Nick Volynkin
  • The links vividly show an example of a correct request so that there are no similar questions on simple topics in the future. - Denis