if we extends the abstract class and provide the implementation for the methods which are declared in abstract class.And then we create the object of that subclass. then at that time default constructor of that subclass is called and we pass 'super' in the constructor of that subclass then it call the constructor of super class? is there is any object create of abstract class?
Life is easy because we write the source code.....
Originally posted by pramod deodeore: if we extends the abstract class and provide the implementation for the methods which are declared in abstract class.And then we create the object of that subclass. then at that time default constructor of that subclass is called and we pass 'super' in the constructor of that subclass then it call the constructor of super class? is there is any object create of abstract class?
What you explain is correct, but there is no object created for abstract class. Constructors are made to initialize the instance variable, though of that base abstract class too..
The way I think of it, which might not be accurate, is that every object has a "part" which is inherited from its superclass. So every object has a toString() method inherited from java.lang.Object. The super() call (explicit or implicit) sets up that "part."