READ Free Dumps For Oracle- 1z0-803
Question ID 21945 | Given:
public class Bark {
// Insert code here - Line 5
public abstract void bark(); // Line 6
} // Line 7
// Line 8
// Insert code here - Line 9
public void bark() {
System.out.println("woof");
}}
What code should be inserted?
|
Option A | 5.class Dog {
9. public class Poodle extends Dog {
|
Option B | 5. abstract Dog {
9. public class poodle extends Dog {
|
Option C | 5. abstract class Dog {
9. public class Poodle extends Dog {
|
Option D | 5. abstract Dog {
9. public class Poodle implements Dog {
|
Option E | 5. abstract Dog {
9. public class Poodle implements Dog {
|
Option F | 5. abstract class Dog {
9. public class Poodle implements Dog {
|
Correct Answer | C |
Explanation Explanation: Dog should be an abstract class. The correct syntax for this is: abstract class Dog { Poodle should extend Dog (not implement).