I looked at the Java source code and the method is as follows:
public static Object newInstance(Class<?> componentType, int length) throws NegativeArraySizeException { return newArray(componentType, length); } private static native Object newArray(Class componentType, int length) throws NegativeArraySizeException;
It doesn't seem to have code in the newArray() method to build the array. Can someone explain how it creates an array? T
source share