Getters and Setters in Kotlin Full Explanation - Object Oriented Programming

Опубликовано: 27 Февраль 2026
на канале: Programming with Alex
60
0

Kotlin and Android Full Course: https://www.udemy.com/course/kotlin-m...

What are getters and setters in Kotlin?
In Object Oriented Programming there are 4 pillars and one of them is Encapsulation - encapsulation means to protect the class properties from being changed directly, instead you will need to use the getters and setters to access them.
In this video we will see what are getters and setters.