問題:
Groovy scripts raises an error: Groovy腳本引發錯誤:
def a = "test"
+ "test"
+ "test"
Error: 錯誤:
No signature of method: java.lang.String.positive() is
applicable for argument types: () values: []
While this script works fine: 儘管此腳本可以正常工作:
def a = new String(
"test"
+ "test"
+ "test"
)
Why? 爲什麼?