Java Tutorials Series - Abstract Classes
What is an Abstract class and why do we need them? Let's uncover few fundamentals from Abstract Classes.
Abstract Classes in Java -
Few major points regarding Abstract classes are -
- We cannot create objects for Abstract classes. In other words, abstract classes cannot be instantiated.
- Abstract classes can have abstract methods as well as non-abstract methods.
- All the classes which are extending abstract classes must implement abstract methods.
- A class can extend only one abstract class but can implement multiple interfaces.
- An abstract class can have or nor have method implementation with or without body.
This is all there is which needs to be taken care for Abstract Classes. Stay tuned for more awesome concepts.
Happy Learning!
Comments
Post a Comment