+ 1

how can i use the getters and setters in java

can i use an other name for the method get and set in java ; be cause i thinks it's work ; thanks for you help

22nd Dec 2016, 7:37 AM
Brahim Chai
Brahim Chai - avatar
2 Respostas
+ 1
if you are coding the class yourself instead of using an already existing one then yes you can. However it is common practice to use get and set and it's what everyone would expect you to name them. my advise would be to just use get and set.
22nd Dec 2016, 9:38 AM
Chris Reinken
Chris Reinken - avatar
0
thanks
22nd Dec 2016, 2:19 PM
Brahim Chai
Brahim Chai - avatar