Привет всем. Подскажите плз.
Наткнулся на такую штуку, как backing property - когда используются два значения - одно приватное, другое паблик, но только с геттером:
// Declare private mutable variable that can only be modified within the class it is declared.
private var _count = 0
// Declare another public immutable field and override its getter method. Return the private property's value in the getter method.
// When count is accessed, the get() function is called and the value of _count is returned.
val count: Int
get() = _count