DEV Community

Discussion on: How I finally understood what a class is

Collapse
 
alphashuro profile image
Alpha Shuro

This is great, well done! I think an important benefit of Classes that can be added in the final section of this article is that you can create a method that takes a parameter of type Person and calls println using the parameter's getters, then you can use this function on each instance of Person, i.e. chris and daniel, without writing out println twice.

Collapse
 
chrisvasqm profile image
Christian Vasquez

Thanks Alpha!

I'll edit the post to add your suggestion 🙌