0

Show a program to highlight getters and setters?

with comments !!

29th Aug 2016, 12:19 PM
Shubham Priyesh
Shubham Priyesh - avatar
2 ответов
+ 1
privateString myField; publicString getMyField(){ //include validation, logic, logging or //whatever you like here returnthis.myField; } publicvoid setMyField(String value){ //include more logic this.myField = value; }
11th Sep 2016, 7:44 PM
Bhushan Gaikwad
Bhushan Gaikwad - avatar
0
dhanyavaad bete
13th Sep 2016, 11:29 AM
Shubham Priyesh
Shubham Priyesh - avatar