If your properties are mutable (`var` instead of `...
# android
g
If your properties are mutable (
var
instead of
val
) you can use getter (“acts like a method”) to get correct result after property change:
Copy code
data class MyDataClass(var first: String, var second: String) {
  val third get() = "$first $second"  
}