static O[] dropLastFromObjectArray(O[] a) { ret dropLastFromObjectArray(a, 1); } static O[] dropLastFromObjectArray(O[] a, int n) { if (a == null) null; n = Math.min(n, a.length); O[] b = new O[a.length-n]; System.arraycopy(a, 0, b, 0, b.length); ret b; }