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

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.

主站蜘蛛池模板: 仙居县| 内江市| 敖汉旗| 高碑店市| 侯马市| 琼中| 万州区| 光山县| 育儿| 汝州市| 靖州| 章丘市| 尖扎县| 萍乡市| 习水县| 广灵县| 驻马店市| 秦安县| 图木舒克市| 城固县| 馆陶县| 洞口县| 东兴市| 江油市| 堆龙德庆县| 普洱| 通道| 赣榆县| 赣州市| 古田县| 金溪县| 纳雍县| 盐津县| 南和县| 阿合奇县| 天气| 平乐县| 盐边县| 察隅县| 阳谷县| 读书|