+ 3
What if I dont want the constructor of the superclass to be executed when creating an object of the subclass?
I am just curious. After all there is a reason why the class is derived..
3 Respostas
+ 1
it is not possible
just don't extend that class
+ 1
michal
What if we overload constructor? And then use that overloaded to creat subclass!
0
every constructor of the subclass calls either another constructor of the subclass (but this can't go infinitely) or the constructor of superclass
so the superclass's constructor will be called anyway