public NormalCat() {
}
Hi, I am wondering, why the constructor have to be present in this case?
why the contructor have to be present
Under discussion
Comments (4)
- Popular
- New
- Old
You must be signed in to leave a comment
Dawn( #11020889)
12 October 2022, 04:36
I have the same question. lol
0
Emanuele Gurini
8 September 2019, 14:43
Hi Luyl,
i think that when you extend a class, if you don not create the constructor, program made his own constructor without inheriting stuff from his parent; infact, how can you see from the exercise, public static class NakedCat has no parent, than does not need to inherit any stuff, and you can let class create is own constructor.
Let me know if you agree with my explain.
0
Luyi
8 September 2019, 17:10
Hello there, I am still not sure, to be honest.
In my opinion the empty constructor is redudant there
When I run the code without it, it works utterly fine.
0
null
5 August 2019, 09:12
i'm curious too
0