Vidyalelo
Data Structure · Q30

Arrays in Data Structures

Programming · Data Structure · question 30

Q30

Which of the following is the correct way to declare a 3D array in Java?

A.
int[][][] array = new int[3][3][3];
B.
int array[][][] = new int[3][3][3];
Answer
C.
int array[3][3][3];
D.
int[] array = new int[3][3][3];

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board