Which of the following statements regarding abstract classes are true?
A. An abstract class can be extended.
B. A subclass of a non-abstract superclass can be abstract.
C. A subclass can override a concrete method in a superclass to declare it abstract.
D. An abstract class can be used as a data type.
E. All of the above
Answer: Option E
Join The Discussion
Comments ( 1 )
A. The keywords public and abstract cannot be used together.
B. The method numberOfStudent() in class School must have a body.
C. You must add a return statement in method numberOfStudent().
D. Class School must be defined abstract.
Which of the following class definitions defines a legal abstract class?
A. class A { abstract void unfinished() { } }
B. class A { abstract void unfinished(); }
C. abstract class A { abstract void unfinished(); }
D. public class abstract A { abstract void unfinished(); }
Which of the following declares an abstract method in an abstract Java class?
A. public abstract method();
B. public abstract void method();
C. public void abstract Method();
D. public void method() {}
E. public abstract void method() {}
Which of the following statements regarding abstract classes are true?
A. An abstract class can be extended.
B. A subclass of a non-abstract superclass can be abstract.
C. A subclass can override a concrete method in a superclass to declare it abstract.
D. An abstract class can be used as a data type.
E. All of the above
I felt option B is not true regarding abstract class