A

Admin • 828.03K Points
Coach

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]);
  • (A) 0
  • (B) 1
  • (C) 2
  • (D) Compiler error
  • Correct Answer - Option(D)
  • Views: 14
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.