I am trying to overwrite a value in a class. I have the following code:
open class Balloon() {
open var textSize: Float = 20f
init {
Log.i("textSize", textSize.toString())
}
}
class BigBalloon(): Balloon() {
override var textSize = 30f
}
However, the Log prints out these values:
First Log is from Balloon(), second one is from BigBalloon(). How can it print 0.0 when I overwrote it as 30? Did I implement all of this incorrectly?
