August 2010
Intermediate to advanced
492 pages
13h 39m
English
In Chapter 6, we have looked at the keyword final, let us now look at another keyword in Java called abstract. The keyword abstract in a sense is opposite of final. It is a modifier only for methods and classes. The modifiers abstract and final cannot be used together. A method or a class cannot be declared to be both abstract and final. A final method prevents overriding, whereas an abstract method promotes overriding. A final class prevents inheritance, whereas an abstract class promotes inheritance.
What is the meaning of declaring a method as abstract. When we declare a method as abstract, then we do not provide an implementation of the method, and the method ...
Read now
Unlock full access