Saurabh Kumar Saurabh Kumar - 11 months ago 90
Java Question

Can one abstract class extend another abstract class and increase functionality

I have an abstract class. I want to extend the abstract class by another abstract class and then implement the extended abstract class. Is it possible .If yes, whether it's a good approach in point of view regarding OOPS?


I'm not sure about Java in particular, but it should be valid.

In terms of OOP, if it makes sense, then run with it. To use some old examples, you might have a Vehicle abstract class and then LandVehicle and FlyingVehicle abstract classes. As long as your example makes sense as an abstract class, then you should be fine.