When to use abstract class in java || what is abstract method || concrete class || java

Опубликовано: 11 Июль 2026
на канале: Programming Funda
448
16

In this video, I have discussed the concept of abstract class and concrete class in java in very simple manner.

I have tried to keep it as simple as possible to really explain it at its easiest.

Tutorial begins with slides and then program is implemented.

Firstly, I have provided the distinction between concrete class and then abstract class in java.

Concrete class in java: If any class has all the methods implemented in it, then the class is called concrete class and the methods are known as concrete methods.

Abstract class: Any class which has at-least one abstract method, must be made abstract. An abstract method has no body, no implementation. Such classes can not be instantiated.
It means you can't create the instance of abstract an abstract class.

Abstract class is mainly of two uses.

1. To be extended and provided the implementation for the abstract method in the derived class.
2. Use its reference, to point it to the object of derived class. This is known as the dynamic or runtime polymporphysm in java.



In program, I have created three class. Namely, Main method class, cat class and supercat class.
First I have explained cat as a concrete class.
Then, Cat as an abstract class and the limitation we will have because of it.
Then, extending the class, I have created supercat class. In the end, I have shown the concept of runtime polymorphism.

Subscribe to our channel for such more future tutorials.

Thank you.

~-~~-~~~-~~-~
Please watch: "difference between microprocessor and microcontroller in hindi | Microprocessor vs Microcontroller"
   • difference between microprocessor and micr...  
~-~~-~~~-~~-~