0
SetVar or this.var
Should I use Setter method in constructor or just change it with this.var?
2 Answers
+ 2
If you found that you needed to, and have implemented a sort of validation mechanism in the setter, then use setter, you can't apply validation when merely assigning member value directly to the `this.<member_name>` thus invalid value assignment is possible IMO.
+ 1
Hm... This makes sense. Thank you)