Use 'val' for read-only (immutable) variables and 'var' for mutable variables.
← Kotlin theorytheory 0/50 · 0%
Fundamentals · easy
3. Val vs Var
Read-only vs Mutable variables.
Check your understanding
1. Which can be reassigned?
2. Which is preferred for safety?