October 2018
Intermediate to advanced
370 pages
9h 15m
English
The var keyword declares a mutable property or local variable. This means that the variable can be changed or updated as follows during the course of the entire program:
var age = 25
In the preceding code, var is a keyword, age is a variable name, and 25 is an assigned integer value. Let's see some other variable definitions to understand the declarations better:
In Kotlin, a variable must have a value assigned. Without proper initialization, it does not allow variable declarations:
var age //In-Valid Declaration; compiler ...
Read now
Unlock full access