1 min readSep 24, 2020
The article stated with mutable
variable.
var a: String? = null
var b: String? = null
the assumption these are global member variable to the class. Hence it cannot be auto-cast. So a local variables are required to ensure the state is not changed after Elvis operation is performed.