scala--定义变量--重新赋值
C:\Users\Administrator>scala
Welcome to Scala 2.11.12 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_421).
Type in expressions for evaluation. Or try :help.
scala> var x = 5
x: Int = 5
scala> x = x * 4
x: Int = 20
scala>
C:\Users\Administrator>scala
Welcome to Scala 2.11.12 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_421).
Type in expressions for evaluation. Or try :help.
scala> var x = 5
x: Int = 5
scala> x = x * 4
x: Int = 20
scala>