nerdexam
Oracle

1Z0-851 · Question #16

Given: class Alligator { public static void main(String[] args) { int []x[] = {{1,2}, {3,4,5}, {6,7,8,9}}; int [][]y = x; System.out.println(y[2][1]); } } What is the result?

The correct answer is E. 7. See the full explanation below for the reasoning.

Question

Given: class Alligator { public static void main(String[] args) { int []x[] = {{1,2}, {3,4,5}, {6,7,8,9}}; int [][]y = x; System.out.println(y[2][1]); } } What is the result?

Options

  • A2
  • B3
  • C4
  • D6
  • E7
  • FCompilation fails.

How the community answered

(55 responses)
  • A
    4% (2)
  • B
    2% (1)
  • D
    9% (5)
  • E
    84% (46)
  • F
    2% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-851 Practice