Look at JLS on Arrays:
The
[]
may appear as part of the type at the beginning of the declaration, or as part of the declarator for a particular variable, or both.
and
Brackets are allowed in declarators as a nod to the tradition of C and C++. The general rules for variable declaration, however, permit brackets to appear on both the type and in declarators, so that the local variable declaration:
float[][] f[][], g[][][], h[]; // Yechh!
is equivalent to the series of declarations:
float[][][][] f; float[][][][][] g; float[][][] h;
So for example:
int []p, q[];
is just
int[] p, q[]
which is in fact
int p[]; int q[][]
The rest are all similar.