Wednesday, February 23, 2011

Groovy string concatenation

Groovy string concatenation weirdness.

String foo = "foo"
+ "blat"

Throws an error, for some reason you have to write it as

String foo = "foo" +
"blat"

So that the + sign does not start a new line.


No comments: