0

I know that concrete classes that extends the abstract classes can benefit from the constructor to save some code, but I still feel it weird that you can have a constructor which can not be used to instantiate the corresponding class.

HFanJava
  • 33
  • 3
  • Because the eventual concrete class may want to save some code as well by delegating to one of the superclass constructors. Or the author of the abstract class may want to require that subclasses follow a certain pattern when using it by forcing them to explicitly invoke a defined superclass constructor. – aroth Mar 18 '14 at 05:04

1 Answers1

0

A constructor is NOT for OBJECT CREATION. Its for object initialization. You can initialize the child class object via the Abstract Class constructor.

TheLostMind
  • 35,966
  • 12
  • 68
  • 104