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

4/2/2020 6:29:19 AM

Akshay Jain

3 Answers

New Answer


Note : get and set called every time if you access veriable https://code.sololearn.com/crN3TLtj2u9W/?ref=app


Becz you will define get and set below of veriable


Sumit Programmer😎😎 what to do when there are multiple variables