#odersky-programming-in-scala-1ed #scala
Any standalone object with a main method of the proper signature can be used as the entry point into
an application.
If you want to change selection, open document below and click on "Move attachment"
Classes and Objectsshown in the next section.
4.4 A Scala application [link]
To run a Scala program, you must supply the name of a standalone singleton object with a main method that takes one parameter, an Array[String],
and has a result type of Unit. <span>Any standalone object with a main method of the proper signature can be used as the entry point into
an application. An example is shown in Listing 4.3:
// In file Summer.scala
import ChecksumAccumulator.calculate
object Summer {
def main(args: Array[String]) {
for (arg Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details