1, window + R cmd open input terminal is opened Run
cmd
2, view the version scala, scala environment variable configuration to ensure success
Microsoft Windows [版本 6.1.7601]
版权所有 (c)2009 Microsoft Corporation 保留所有权利。
C:\Users\Administrator> scala -version
Scala code runner version 2.11.8 -- Copyright 2002-2016, LAMP/EPFL
C:\Users\Administrator>
3, the terminal into the scala
C:\Users\Administrator>scala
Welcome to Scala 2.11.8 (Java HotSpot(TM) 64-Bit Server VM. Java 1.8.0_144).
Type in expressions for evaluation. Or try : help.
scala> 7 * 4 + 2
res0: Int = 30
Interpreter type while also returns the result of this example is Int
4, call the method, you can use the Tab key, the code completion
scala> res0.toString.toUpperCase
res1: String = 30
scala>
Technically, Scala interpreter is not actually happening is that the contents of the input, and is quickly compiled into byte code, and then handed over to the Java Virtual Machine byte code execution, which is why most of the Scala program members prefer, the scala language called "REPL" language
Reproduced in: https: //www.jianshu.com/p/679dd2a5a3d1