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.
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 callsprintln
using the parameter's getters, then you can use this function on each instance ofPerson
, i.e. chris and daniel, without writing outprintln
twice.Thanks Alpha!
I'll edit the post to add your suggestion 🙌