Why can't I write println "Hello world" in Scala?

Viewed 1886

I'm pretty new to Scala, but I thought that one of the strengths of the language was to remove the ceremony, like parenthesis and dots, that exists in for instance Java. So I was pretty confused when I discovered that I can write for instance

str1 equals str2

but not

println "Hello world"

I have surmised that it has something to do with that the first example has three "parts", but the second has only two, but I'm struggling to understand why it is so.

2 Answers
Related