Saturday, March 23, 2013


Can Abstract class has constructor in Java?
          Yes,Abstract class has constructor in Java.You will provide constructor explicitly or not,compiler provide default constructor with zero argument  in Abstract class.This is true for all class and also applicable for abstract class.Generally we cannot create object for abstract class by using new operator.
         We can create child class by extending abstract class.When we creating object for child class, child class constructor calls parent class constructor i.e,Abstract class constructor but not creating object for abstract class.

No comments:

Post a Comment