Very simple code:
int[] a = new int[]{4,1,2,3};
Array a3 = (Array) Array.newInstance(a.getClass(), a.length);
It throws an exception 'Exception in thread "main" java.lang.ClassCastException: [[I cannot be cast to java.lang.reflect.Array'
Where did I get wrong and how to fix it?
int[]array or a newint[][]array?