nerdexam
Oracle

1Z0-850 · Question #44

Given: 1. interface Flyer { 2. void takeoff(); 3. boolean land(); 4. } 5. class Airplane implements Flyer { 6. public void takeOff() { / some code / } 7. // insert code here 8. return true; 9. } 10…

The correct answer is D. public boolean land() {. See the full explanation below for the reasoning.

Question

Given:
  1. interface Flyer {
  2. void takeoff();
  3. boolean land();
  4. }
  5. class Airplane implements Flyer {
  6. public void takeOff() { /* some code */ }
  7. // insert code here
  8. return true;
  9. }
  10. } Which, inserted at line 8, correctly implements the interface?

Options

  • Aboolean land(int i) {
  • Bpublic void land() {
  • Cprotected boolean land() {
  • Dpublic boolean land() {
  • Eboolean land() {

How the community answered

(55 responses)
  • A
    2% (1)
  • B
    4% (2)
  • C
    5% (3)
  • D
    78% (43)
  • E
    11% (6)

Community Discussion

No community discussion yet for this question.

Full 1Z0-850 Practice