in scala
class Application

class Application()
extends Object
with ScalaObject

The Application class can be used to quickly turn objects into executable programs. Here is an example:
  object Main with Application {
    Console.println("Hello World!");
  }
  
Here, object Main inherits the main method of Application. The body of the Main object defines the main program. This technique does not work if the main program depends on command-line arguments (which are not accessible with the technique presented here). It is possible to time the execution of objects that inherit from class Application by setting the global scala.time property. Here is an example for benchmarking object Main:
  java -Dscala.time Main
  
Author:
Matthias Zenger
Version:
1.0, 10/09/03

Field Summary
  val executionStart: Long
     The time when execution of this program started.

Method Summary
  def main(args: Array[String]): Unit
     The default main method.

Methods inherited from java/lang/Object-class
clone, eq, equals, finalize, getClass, hashCode, notify, notifyAll, synchronized, toString, wait, wait, wait

Methods inherited from scala/Any-class
!=, ==, asInstanceOf, isInstanceOf, match

Field Detail

executionStart

  val executionStart: Long
The time when execution of this program started.
Method Detail

main

  def main(args: Array[String]): Unit
The default main method.