I am learning scala, and meet a little problem. I want to use the String method stripMargin as following. But I can not add parenthesis on this method. I remember that no-argument method's parenthesis is optional, so here why I can not add parenthesis ?
val str=""" hello world
|" ANd soe"
|" to world"""
println(str.stripMargin()) // won't compile
println(str.stripMargin) // compiles successfully