Why the "hello, world" is not output to the console?

Viewed 41925

I'm just learning scala, and I wrote the "hello,world" program like this:

object HelloWorld {
    def main(args: Array[String]) { 
        println("Hello, world!") 
    } 
}

I saved it to a file named "helloworld.scala"

Now I run it in the console:

scala helloworld.scala

But nothing outputed. I thought it will output "Hello, world". Why?

PS

If I modify the content to:

println("Hello, world")

and run again, it will output "hello,world".

2 Answers
Related