fork download
  1. /*
  2. =====================================================
  3. 5. SORTING ALPHABETS
  4. =====================================================
  5. */
  6. public class AlphabetSorting {
  7.  
  8. public static void mainMethod() {
  9.  
  10. List<String> names = new List<String>{'Z','A','D','B','C'};
  11.  
  12. names.sort();
  13.  
  14. System.debug(names); // (A,B,C,D,Z)
  15. }
  16. }
Success #stdin #stdout #stderr 0.01s 7864KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
./prog:1: expected expression