What do I need to run a .scala file?

1.31K viewsScalascala

What do I need to run a .scala file?

What do I need to run a .scala file?

Share:
vito Answered question February 25, 2021
0

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.

Share:
vito Answered question February 25, 2021
0
You are viewing 1 out of 1 answers, click here to view all answers.