static O[] newObjectArrayOfSameType(O[] a, int n) { ret (O[]) Array.newInstance(a.getClass().getComponentType(), n); }