I am going through some Java code and I see lots of abstract classes which contain nothing in them.
For eg. something like this –
public abstract class Processor
{
}
They have concrete implementation classes though. In what situations would such abstract classes make sense?
Abstractclasses are used when you have some logic which would be common to all possible implementing classes.Writing an
Abstract classwith nothing inside and different classes extending it is pretty much useless.The onlydifferenceis that you can use the samehandlefor all the concrete classes.