I created the following groovy class in groovy editor.
Then I used the feature "Generate toString()" to create toString() code using the 3 fields. Code style is String concatenation and used default template.
The generated code is:
The problem is that this method returns only the first line of the String, truncating at the end of "this.str2"
This may be solved by moving the + at the beginning of the second line to the end of the first:
This code prints both lines