[beginning-scala-programming] Variable


Variable

val a = 5  // Int = 5,
// non-changable value, final in Java, prefered in Scala
var b = 5  // Int = 5,
b = 7

var x, y, z = 0 //  x = 0, y = 0,  z = 0

val (c,d)  = (3,5) // pattern usring tuples

// tuple
(6,7) // (Int, Int)