text: public static <T> T[] copyOf(T[] original, int newLength) {if (original == null) {throw new NullPointerException();}if (newLength < 0) {throw new NegativeArraySizeException();}return copyOfRange(original, 0, newLength);}