There is an array of characters in Java, for example:
char[] arr = {'a', 'f', 'q', 'b'};
How to sort it?
import java.util.Arrays; public class ArrayDemo { public static void main(String[] args) { char cArr[] = {'r','q','s','p'}; Arrays.sort(cArr); }
Source: https://ru.stackoverflow.com/questions/503579/
All Articles