0
int [] a, b[],c ; int [] a , b,[]c ; a)both is right? b) both are invalid?? c) only 1st is correct d) only 2nd is correct
2 odpowiedzi
+ 5
I think ans. c)
since java define var like forEach order
um gonna try da 2nd one
But why my internet is bad like this?
+ 3
int[] a; valid
int []a; valid
int [] a; valid
int a[]; valid
int a []; valid
int[] a, b[]; not valid if you're expecting b to be a single dim array, but will complie
int[] a, []b; not vaild
with the last two you're are attempting to declare a second type in the same line without first ending the statement with a semicolon. I.E. a 2 dimensional array. Java doesn't care if the square brackets come before or after the variable name or the white space.