I have a code
String ejgStr[] = new String[][]{{null},new String[]{"a","b","c"},{new String()}}[0] ;
System.out.println(ejgStr[0]);
which compiles without error. From what I understand you can't create an array with non-matching square brackets.
On the left, we have String ejgStr[], which is 1-d array and
On the right, we have String[][]{some array}[0], which is 2-d array
These seem to have different dimensions but why do they successfully compile?
String[] ejgStr =. The other allowed notation was added for compatibility with C/C++, and is a dead giveaway of a novice or C/C++ programmer. ;)