I have the following code:
public class TestGr
{
static String aaa = "wwww";
public static void main(args)
{
println "["+getAAA()+"]";
println "[" + getBBB() +"]";
}
static String getAAA()
{
return ""
+ "${aaa}"
}
static String getBBB()
{
return "" + "${aaa}"
}
}
The output of this code is:
[]
[wwww]
I do not understand why in the first call I get an empty string. Does anybody know why a line break change the output of a function?