DEV Community

Shubham Rathi
Shubham Rathi

Posted on

Day 1 with kotlin [Mastering Kotlin in 100 Days]

Variable Types in kotlin

var vs val
The value of variable type val can not be changed later on,
forex, val a = 5

Later on, you cannot make this a = 6
To achieve this you need to initialize this with var a = 5

Top comments (0)