+ 2

I dont understand getter function...

Plz talk about getter function because I can't understand it

20th Jan 2018, 7:38 AM
Vitaliy Chernysh
Vitaliy Chernysh - avatar
1 Answer
+ 4
A getter function returns the value of a variable. Normally that variable is declared private, so you only can change it over a setter method. As you see, if you use a setter method, it's obvious that you should also use a getter one.
20th Jan 2018, 8:06 AM
Jonas Schröter
Jonas Schröter - avatar