An array of array can be created in java?

Answer:
Yes.

int[][] as; // this will define an array of arrays of integers



Multidimensional arrays, remember, are simply arrays of arrays. So a two-dimensional array of type int is really an object of type int array (int []), with each element in that array holding a reference to another int array. The second dimension holds the actual int primitives. The following code declares and constructs a two-dimensional array of type int:

int[][] myArray = new int[3][];

Notice that only the first brackets are given a size. That's acceptable in Java, since the JVM needs to know only the size of the object assigned to the variable myArray.
First answer by Moobler. Last edit by Anandvijayakumar. Contributor trust: 781 [recommend contributor recommended]. Question popularity: 2 [recommend question].