+ 6
Can someone please help me explain getters and setters in java
please someone should help me explain the functions getters and setters👌👌
3 ответов
+ 6
https://www.sololearn.com/learn/Java/2154/?ref=app
this help you
+ 3
jay matthews i cant seem to get it
+ 2
The principle or the meaning of getter/setter:
if you provide a getter/setter for the property, you provide them indirect access while taking full control of it.
you can add validation to getter/setter and you know exactly the way the property will be change.
good explanation:
https://dzone.com/articles/why-should-i-write-getters-and-setters