nerdexam
Oracle

1Z0-851 · Question #206

Click the Exhibit button. Which three code fragments, added individually at line 29, produce the output 100? (Choose three.)

The correct answer is B. i.setX( 100 ); C. o.getY().setX( 100 ); F. i = new Inner(); i.setX( 100 ); o.setY( i ). See the full explanation below for the reasoning.

Question

Click the Exhibit button. Which three code fragments, added individually at line 29, produce the output 100? (Choose three.)

Exhibit

1Z0-851 question #206 exhibit

Options

  • An = 100;
  • Bi.setX( 100 );
  • Co.getY().setX( 100 );
  • Di = new Inner(); i.setX( 100 );
  • Eo.setY( i ); i = new Inner(); i.setX( 100 );
  • Fi = new Inner(); i.setX( 100 ); o.setY( i );

How the community answered

(34 responses)
  • A
    3% (1)
  • B
    79% (27)
  • D
    6% (2)
  • E
    12% (4)

Community Discussion

No community discussion yet for this question.

Full 1Z0-851 Practice