+ 1
What is the use of abstract class in java?
2 Respostas
+ 1
I don't know java, but an abstract class is a class that can't be instanced but can be inherited by another class.
It is useful when you make a class like "Character" that is not a character itself but gives the basic Position, Walk and Eat. Any special character type inheriting Characyer is a real character type and can be instanced.
0
Imagine that you have an hierachy of classes that share some code... Its probable that do you make a super class then subclass it... But what if do you want make instanciable only subclasses? In this case abstract class help you to define this behaviour