Skip to main content
InterviewHubPRO
Section Overview
Q1

Question 1 of 50

Part 1: Core Language, Type System & Syntax (1 - 10)

2%
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 to final in Java or const in TypeScript).
  • var (Variable): Mutable reference. Can be reassigned to different values of the same type.