What do I need to run a .scala file?
What do I need to run a .scala file?
What do I need to run a .scala file?
vito Answered question February 25, 2021
You need to compile a .scala file in order to run it. Below is the command to compile a .scala file,
scalac file.scala
This will generate a class file of your program with an extension .class. You need to execute this file in order to generate the output from your program. Below is the command to run a class file,
scala file
Note: you don’t need to provide .class extension for the above command.
vito Answered question February 25, 2021