Kotlin - Variables and Type System
What is the issue with this Kotlin code snippet?
val score = 100 score += 50 println(score)
val score = 100 score += 50 println(score)
val immutabilityval variables cannot be reassigned or modified.score += 50 attempts to modify score, which is illegal.val variable after initialization -> Option Bval variables are immutable [OK]val variables cannot be changed [OK]val variablesval with var15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions