We can execute a Scala program in two modes: one is an interactive mode and another is script mode.
Open the command prompt and use the following command to open Scala.
If Scala is installed in your system, the following output will be displayed −
Welcome to Scala version 188.8.131.52
Type in expressions to have them evaluated.
Type :help for more information.
Type the following text to the right of the Scala prompt and press the Enter key −
scala> println("Hello, Scala!");
It will produce the following result −