Which two are valid declarations of a two-dimensional array?
A.
int [] [] array2D;
B.
int [] [] array2D [];
C.
int [] array2D [];
D.
int [2] [2] array2D;
E.
int array2D [];
Explanation:
Which two are valid declarations of a two-dimensional array?
Which two are valid declarations of a two-dimensional array?
A.
int [] [] array2D;
B.
int [] [] array2D [];
C.
int [] array2D [];
D.
int [2] [2] array2D;
E.
int array2D [];
Explanation:
A,C
Answer: A, C
Explanation:
B is wrong because is a declaration for a three-dimensional array
D is wrong because is not written in a valid syntax.
E is wrong because is a declaration for a one-dimensional array.