4. Which of the following is the correct way to declare a multidimensional array in Java?

a) int[] arr;
b) int arr[[]];
c) int[][]arr;
d) int[[]] arr;

Answer: c
Explanation: The syntax to declare multidimensional array in java is either int[][] arr; or int arr[][];

Leave a Reply

Your email address will not be published.