Array.newInstance(Class <?> componentType, int... dimensions) has the following syntax.
public static Object newInstance(Class <?> componentType, int... dimensions) throws IllegalArgumentException , NegativeArraySizeException
In the following code shows how to use Array.newInstance(Class <?> componentType, int... dimensions) method.
import java.lang.reflect.Array; public class Main { public static void main(String[] argv) throws Exception { int[][] ints = (int[][]) Array.newInstance(int.class, 10,5); } }