Why not just move name and age to the class body? This way you get a no-arg constructor by default. And you can use with or apply elsewhere in code when instantiating Person.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Why not just move
name
andage
to the class body? This way you get a no-arg constructor by default. And you can usewith
orapply
elsewhere in code when instantiatingPerson
.