Which of the following create an empty two-dimensional array with dimensions 2×2?
A. int[][] blue = new int[2, 2];
B. int[][] blue = new int[2], [2];
C. int[][] blue = new int[2][2];
D. int[][] blue = new int[2 x 2];
Answer:C
Which of the following create an empty two-dimensional array with dimensions 2×2?
A. int[][] blue = new int[2, 2]; B. int[][] blue = new int[2], [2]; C. int[][] blue = new int[2][2]; D. int[][] blue = new int[2 x 2];
Explanation: A two-dimensional array is declared by listing both sizes in separate pairs of braces.