Q. What is the output of the Java program with the multidimensional array?
Code:int[][] goats;
goats = new int[3][];
goats[0] = {1,2};
System.out.println(goats[0][1]);
β
Correct Answer: (D)
Compiler error
int[][] goats;
goats = new int[3][];
goats[0] = {1,2};
System.out.println(goats[0][1]);
You must be Logged in to update hint/solution