when you con't create an Object to an Abstract class, how come we can declare constractor over there
Printable View
when you con't create an Object to an Abstract class, how come we can declare constractor over there
I don't understand what you're asking. I recommend providing an SSCCE that demonstrates exactly what you're talking about.
I think you are asking:
If you can not create an object of an abstract class, why can an abstract class have a constructor?
...and if that is the question;
Because you can add code inside that constructor so that it is done for all classes that extend the abstract class.