+ 1

Getters and setters in Kotlin

Can you tell, how set and get function's variable field know that it is linked to age variable. https://www.sololearn.com/learn/9789/?ref=app

2nd Apr 2020, 6:29 AM
Akshay Jain
Akshay Jain - avatar
3 Answers
+ 2
Note : get and set called every time if you access veriable https://code.sololearn.com/crN3TLtj2u9W/?ref=app
2nd Apr 2020, 5:38 PM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
+ 3
Becz you will define get and set below of veriable
2nd Apr 2020, 9:07 AM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
0
Sumit Programmer😎😎 what to do when there are multiple variables
2nd Apr 2020, 9:25 AM
Akshay Jain
Akshay Jain - avatar