官术网_书友最值得收藏!

Scala REPL

There is more than one way of interacting with Scala. One of them is using Scala Interpreter (REPL). To run Scala REPL using SBT, just give the following command in the command prompt/terminal:

sbt console

This command will run Scala REPL.

To run Scala REPL using Scala binary, perform the following:

  1. Go to https://www.scala-lang.org/download/.
  2. Download the latest Scala archive.
  3. Extract the archive to any directory.
  4. Set the directory path as environment variables as shown in https://www.scala-lang.org/download/install.html.
  5. Try running the scala command, it should look something like this:

If so, congrats. You've done it. Now it's asking you to type any expression. You may try typing any expression. Try anything, like 1 + 2 or 1 + "2". REPL is your playground to learn Scala.

主站蜘蛛池模板: 宣汉县| 广南县| 库车县| 鄂州市| 冷水江市| 广汉市| 溆浦县| 金乡县| 鄂托克前旗| 河东区| 呈贡县| 镇江市| 乐业县| 南岸区| 社旗县| 马公市| 宁城县| 云和县| 古丈县| 仁化县| 当雄县| 高清| 通化市| 自治县| 静安区| 永顺县| 梓潼县| 阳朔县| 寿阳县| 蚌埠市| 吉安市| 颍上县| 轮台县| 扎鲁特旗| 专栏| 保定市| 高平市| 寻甸| 深泽县| 杭锦旗| 工布江达县|