When to use " " ( space ) and when to use . ( dot ) when invoking methods in Scala?

Viewed 2902

I've seen Scala using both interchangeably, but I don't know when to use one or the other.

Is there a convention?

For instance these are equivalent

"hello" toString 

and

"hello".toString()

And they can even be mixed

"hello".toString() length 

What's the convention?

2 Answers
Related