Saurabh Kumar Saurabh Kumar - 2 years ago 136
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?

Answer Source

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.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download