rol*_*luo 4 java arrays reflection
我研究了Java源代码,方法如下:
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;
Run Code Online (Sandbox Code Playgroud)
它似乎在newArray()构建数组的方法中没有任何代码.任何人都可以解释它是如何构建数组的?Ť
| 归档时间: |
|
| 查看次数: |
327 次 |
| 最近记录: |