How to define multiline string in Groovy

1 Answer

0 votes
String s = '''\
Apache Groovy is a Java-syntax-compatible
object-oriented programming language
'''; 

println(s)
      



/*
run:

Apache Groovy is a Java-syntax-compatible
object-oriented programming language

*/

 



answered Sep 30, 2020 by avibootz

Related questions

1 answer 190 views
190 views asked Sep 28, 2020 by avibootz
1 answer 278 views
278 views asked Oct 5, 2020 by avibootz
1 answer 543 views
543 views asked Oct 5, 2020 by avibootz
1 answer 303 views
303 views asked Oct 5, 2020 by avibootz
1 answer 229 views
229 views asked Oct 4, 2020 by avibootz
1 answer 197 views
197 views asked Oct 3, 2020 by avibootz
...