Mega Code Archive

 
Categories / Java Book / 008 Reflection
 

0475 Create new Array instance

static Object newInstance(Class<?> componentType, int... dimensions) Creates a new array with the component type and dimensions. static Object newInstance(Class<?> componentType, int length) Creates a new array with the component type and length.