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

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.

主站蜘蛛池模板: 武宁县| 抚远县| 渝北区| 来凤县| 吉林省| 茌平县| 水城县| 黎平县| 西乌| 延寿县| 上饶县| 襄樊市| 公安县| 那坡县| 井冈山市| 芦溪县| 调兵山市| 紫云| 丰原市| 平定县| 高雄市| 射阳县| 怀化市| 澜沧| 无棣县| 邯郸县| 五家渠市| 仪陇县| 洪洞县| 钦州市| 元氏县| 义乌市| 江口县| 扶风县| 辉南县| 怀宁县| 云安县| 兴安县| 鹤山市| 万山特区| 久治县|