nerdexam
Oracle

1Z0-804 · Question #17

Given: Which statement, inserted at line 8, enables the code to compile?

The correct answer is C. new Task.Counter().increment(). See the full explanation below for the reasoning.

Question

Given:

Which statement, inserted at line 8, enables the code to compile?

Options

  • Anew Task().new Counter().increment();
  • Bnew Task().Counter().increment();
  • Cnew Task.Counter().increment();
  • DTask.Counter().increment();
  • ETask.Counter.increment();

How the community answered

(38 responses)
  • A
    3% (1)
  • B
    13% (5)
  • C
    74% (28)
  • D
    3% (1)
  • E
    8% (3)

Community Discussion

No community discussion yet for this question.

Full 1Z0-804 Practice