Reputation: 37
I'm trying to print a string in groovy but the results show an additional empty line below the printed string. Here are my codes:
String strg = "11110111"
println "strg:"+strg
The expected results should be "11110111" but the result has an additional empty line below it. May I know what went wrong and how to solve it? Thanks!
Upvotes: 0
Views: 106
Reputation: 28564
Use print
instead of println
.
println
adds a new line at the end of printed string.
Upvotes: 2