Possible Duplicate:
What is the rule for parenthesis in Scala method invocation?
I'm new to Scala, and I have some confusion with the () on postfix operator
I was told that toLong and toString are postfix operators for any integer, so I tried the following operations:
scala> 7 toString
res18: java.lang.String = 7
scala> 7.toString()
res19: java.lang.String = 7
scala> 7.toString
res20: java.lang.String = 7
scala> 7.toLong
res21: Long = 7
scala> 7.toLong()
<console>:8: error: Long does not take parameters
7.toLong()
^
So, when shall one use "()" after an operator? Is there any pattern in that?
Big Thanks!