Java tutorial
import java.util.Arrays; public class Main { public static void main(String[] args) { char aArr[] = { 'j', 'a', 'v', 'a' }; System.out.println(Arrays.toString(aArr)); // sorting array from index 0 to 3 Arrays.sort(aArr, 0, 3); System.out.println(Arrays.toString(aArr)); } }