October 2018
Intermediate to advanced
370 pages
9h 15m
English
Kotlin also allows us to override class properties to provide new definitions. Overriding the property is similar to overriding the function: the property must be declared as open in the parent class and the override keyword must be used in the child class to make sure that the property is being overridden explicitly and not accidentally.
Property-overriding is possible in the following cases:
We can override the val properties with either the val or var properties, and we can override the var properties with other var properties, but ...
Read now
Unlock full access