1.

What Are The Scala Variables?

Answer»

Values and VARIABLES are two shapes that come in SCALA. A value variable is constant and cannot be changed once assigned. It is immutable, while a regular variable, on the other hand, is mutable, and you can CHANGE the value.

The two TYPES of variables are

var MYVAR : Int=0;
val myVal: Int=1;

Values and variables are two shapes that come in Scala. A value variable is constant and cannot be changed once assigned. It is immutable, while a regular variable, on the other hand, is mutable, and you can change the value.

The two types of variables are

var myVar : Int=0;
val myVal: Int=1;



Discussion

No Comment Found