You can use the constructor with a parameter in your abstract class (make it protected if you want to allow anonymous subclasses).
public abstract class Points{ protected Points(Something parameter){
By doing this, you force the implementation class to have an explicit constructor, since it must call a super constructor with one parameter.
However, you cannot force an override class to have a constructor with parameters. It can always fake a parameter as follows:
public class ExtendPoints extends Points{ public ExtendPoints(){ super(something); } }
Sean Patrick Floyd May 17 '11 at 9:03 a.m. 2011-05-17 09:03
source share