import java.util.Arrays; /** * Approach1 * Simple sort * Simplest but, no one want's */ public class Approach1 { public void sort012(int[] a) { if (a == null || a.length == 0) { throw new IllegalArgumentException("Array is null or empty"); } Arrays.sort(a); } }