nerdexam
Oracle

1Z0-851 · Question #81

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 #81 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

(31 responses)
  • A
    13% (4)
  • B
    77% (24)
  • D
    6% (2)
  • E
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-851 Practice