Kotlin 1 5 If - When
Kotlin 1 5 If - When
if & when
if is an expression
String result;
...
if (a instanceof String) {
result = "is string of length " + ((String) a).length();
}
no argument
True or false?
?
? You always should replace if with when
1. true
2. false