scala> object HelloWorld{
| def main(args: Array[String]){
| println("Hello World From Scala")
| }
| }
To execute above code, type:
scala> HelloWorld.main(null)
Or you can use:
scala> object Hello extends Application{| println("Hello World From Scala")
| }
To run it, just type:
scala> Hello
No comments:
Post a Comment