0
Why here the output is "New Animal New Bee" but this questions answer is only "B" and not "A B"?
2 ответов
0
Is it because of one time it's the constructor and one time it's a method?
0
What's your actual question ?(about A, B)!
Code calls both constructors because of "new Bee();"
Bee class extends Animal class so when creating instance, it's super class constrictor first executed , (which causing "New Animal" to print) then it calls it's constructor (which causing "New Bee" to print).