
Variables defined with var are mutable(Read and Write)
Variables defined with val are immutable(Read only)
Simply, var (mutable) and val (immutable values like in Java (final modifier)
var x:Int=3
x *= x
//gives compilation error (val cannot be re-assigned)
val y: Int = 6
y*=y
val and var both...