Kotlin - Variables and Type System
What is the inferred type of
value in this Kotlin code?val value = if (true) 10 else 10.5
value in this Kotlin code?val value = if (true) 10 else 10.5
if branch returns Int (10), the else branch returns Double (10.5).Number (common supertype).15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions