Java array sort elements
import java.util.Arrays; public class Main { public static void main(String args[]) { String[] n = new String[] { "Java", "C++", "Javascript", "CSS", "HTML", "SQL" }; System.out.println(Arrays.toString(n)); //from www. jav a2s. c om Arrays.sort(n); System.out.println(Arrays.toString(n)); } }