nerdexam
Oracle

1Z0-851 · Question #90

Click the Exhibit button. Given: A a = new A(); System.out.println(a.doit(4, 5)); What is the result?

The correct answer is A. Line 26 prints "a" to System.out. See the full explanation below for the reasoning.

Question

Click the Exhibit button. Given: A a = new A(); System.out.println(a.doit(4, 5)); What is the result?

Exhibit

1Z0-851 question #90 exhibit

Options

  • ALine 26 prints "a" to System.out.
  • BLine 26 prints "b" to System.out.
  • CAn exception is thrown at line 26 at runtime.
  • DCompilation of class A will fail due to an error in line 6.

How the community answered

(38 responses)
  • A
    76% (29)
  • B
    13% (5)
  • C
    3% (1)
  • D
    8% (3)

Community Discussion

No community discussion yet for this question.

Full 1Z0-851 Practice