Multiple choice

What will be the output of the following code?

1 class AClass {2 String[] a;3 int[] numArray [] = {{1,2}, {1}};4 Object obj = new long[4];5 }

  1. Compilation succeeds

  2. Compilation fails due to an error in line 3

  3. Compilation fails due to an error in line 4

  4. Runtime error

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

All the array declarations are correct.