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:
- interface Flyer {
- void takeoff();
- boolean land();
- }
- class Airplane implements Flyer {
- public void takeOff() { /* some code */ }
- // insert code here
- return true;
- }
- } 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)- A2% (1)
- B4% (2)
- C5% (3)
- D78% (43)
- E11% (6)
Community Discussion
No community discussion yet for this question.