What us the difference between int[][] a = new int[2][3]
and int a[][] = new int[][]{{11,12},{13,14,15}}
?
I decompiled the .class file and found in the first case, the JVM will use multianwearray to create the array, while in the second case, it will use anewarray.
I think in the first case, JVM will create a continuous space. Am I right?
first case (int[][] a = new int[2][3]
)
second case (int[][] a = new int[][]{{11,12},{13,14,15}}
)