+ 6

Can someone please help me explain getters and setters in java

please someone should help me explain the functions getters and setters👌👌

28th Jun 2018, 7:11 PM
King Frankostein®
King Frankostein® - avatar
3 Respostas
28th Jun 2018, 7:22 PM
Arun Tomar
Arun Tomar - avatar
+ 3
jay matthews i cant seem to get it
28th Jun 2018, 7:15 PM
King Frankostein®
King Frankostein® - avatar
+ 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
28th Jun 2018, 8:27 PM
asa22