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

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.

主站蜘蛛池模板: 临沭县| 华坪县| 天台县| 盐津县| 海原县| 乌拉特前旗| 都安| 平乡县| 西和县| 叙永县| 成武县| 芷江| 陇西县| 祁门县| 洪湖市| 大余县| 湄潭县| 海伦市| 潞西市| 嘉善县| 洪雅县| 大港区| 永和县| 常山县| 托克逊县| 雅江县| 福贡县| 信宜市| 成都市| 双牌县| 恩平市| 虹口区| 沙河市| 綦江县| 永德县| 遂川县| 乐安县| 兰坪| 灵石县| 阿拉善右旗| 五大连池市|