![]() |
![]() |
Java Interface | |
Java Class vs Interface | |
Java Multiple Inheritance | |
Java Nested Interface |
Java Packages | |
Java Built in packages | |
Java Package Access Specifiers |
Java Programs | |
Java Keywords Dictionary | |
Java Interview Questions |
In java method cannot be redefined in a subclass by making it as final. But the abstract concept is opposite to final.
Abstract can be indicated that a method must always be redefined in a subclass.
The keyword abstract is used for making methods and classes abstract.
The class which is declared using keyword abstract called as abstract class.
Properties of abstract Class
The methods which are declared as abstract called as abstract methods.
Properties of abstract methods
abstract class className // abstract class declaration { abstract type methodName(); // abstract method declaration }Example
Program to demonstrate abstract class and method.
abstract class Software { String name; abstract void features(); }Output
I'm display 1
I'm display 2