Correct Answer: B
Explanation/Reference:
Explanation:
Note:An abstract method in Java is something like a pure virtual function in C++ (i.e., a virtual function that
is declared = 0). In C++, a class that contains a pure virtual function is called an abstract class and cannot
be instantiated. The same is true of Java classes that contain abstract methods.
Any class with an abstract method is automatically abstract itself and must be declared as such.
An abstract class cannot be instantiated.
A subclass of an abstract class can be instantiated only if it overrides each of the abstract methods of its
superclass and provides an implementation (i.e., a method body) for all of them. Such a class is often
called a concrete subclass, to emphasize the fact that it is not abstract.
If a subclass of an abstract class does not implement all the abstract methods it inherits, that subclass is
itself abstract. static, private, and final methods cannot be abstract, since these types of methods cannot
be overridden by a subclass. Similarly, a final class cannot contain any abstract methods.
A class can be declared abstract even if it does not actually have any abstract methods. Declaring such a
class abstract indicates that the implementation is somehow incomplete and is meant to serve as a
superclass for one or more subclasses that will complete the implementation. Such a class cannot be
instantiated.