import java.util.Arrays; public class ArraySort { public static void main(String[] args) { String s[]={"xt","mn","ab","cd","ef"}; Arrays.sort(s); for (int i = 0; i < s.length; i++) { System.out.println(s[i]); } } }
ab cd ef mn xt