Given:
int[] a1[],a2[];
It seems to me that the 1st array obj ref is a 2d array, and the 2nd one is a simple array.
Well both of them are 2D arrays. What you say would have been true if the declaration had been sth like:
int[] a1[],a2;
Given:
int[][] a = {{1,2,3},{4,5,6},{7,8,9,10}};
Is this also valid? Is it not that the 2nd pair of curly braces must be a set of parentheses?
Yes, this is valid as is this how multidimesional arrays are declared and contructed, using curly braces and not parenthesis.
Regards,
Anupreet