Kotlin & Coroutines (50 Qs)•Part 1: Core Language, Type System & Syntax (1 - 10)
What is the difference between `val` and `var` in Kotlin?
junior LevelkotlinCore Language
In Simple Words:
val(Value): Read-only reference (immutable pointer). Once initialized, it cannot be reassigned (similar tofinalin Java orconstin TypeScript).var(Variable): Mutable reference. Can be reassigned to different values of the same type.