Which two are valid declarations of a two-dimensional array?

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:



Leave a Reply 2

Your email address will not be published. Required fields are marked *


imyrta

imyrta

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.