DEV Community

Discussion on: How I finally understood what a class is

chrisvasqm profile image
Christian Vasquez Author

Thanks for the tips, Gustavo.

Regarding the default constructor, I thought it would be a correct way of calling it since that implementation of the Person class does not allow the client of our code to create an object without passing any arguments to it. Would it be better to say "overriding the default constructor"?

gustavoagt profile image
Gustavo Gómez

Thanks to you, i really like it as an introduction for classes, you should continue doing this kind of post.

I considered can be called just param-constructor, if we explicitly add no-args-contructor can be called as a overloaded constructor. The Overrinding is not possible for constructors because the behavior strictly belongs to the class.