Card 12 / 42: Which of the following declaration will compile without errors?
A)
public abstract class Digit { public abstract void print(); }
B)
public class Digit { public abstract void print(); }
C)
public abstract class Digit { public abstract void print(){} }
D)
public abstract class Digit { public void print();}
E)
public class Digit { public void print(){};}
Answer:
A) public abstract class Digit { public abstract void print(); }
E) public class Digit { public void print(){};}
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
An abstract method has no implementation .