Yes we can. For e.g:
public abstract class TestEngine {
private String engineId;
private String engineName;
public TestEngine(String engineId String engineName)
{
this.engineId engineId;
this.engineName engineName;
}
//public gettors and settors
public abstract void scheduleTest();
}
public class JavaTestEngine extends TestEngine
{
private String typeName;
public JavaTestEngine(String engineId String engineName String typeName)
{
super(engineId engineName);
this.typeName typeName;
}
public void scheduleTest()
{
//do Stuff
}
}
A class has a constructor so that when an instance of the class is created
the fields of the class can be setup to a initial valid state.
Abstract classes define partial implementation of a public contract. Which
means that it may implement some of the methods and contains partially
implemented methods that are marked abstract.
Since abstract classes can have partial implementation and such partial
implementation can include fields of the class a constructor becomes necessary
so that those fields are initialized to a valid default state when they are
created thru the constructor of their concrete subclasses.
All abstract class are not pure abstract partially they are. So if you
need a pure abstract class go for an Interface.