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 286 views
286 views asked Sep 28, 2020 by avibootz
1 answer 383 views
383 views asked Oct 5, 2020 by avibootz
1 answer 650 views
650 views asked Oct 5, 2020 by avibootz
1 answer 406 views
406 views asked Oct 5, 2020 by avibootz
1 answer 334 views
334 views asked Oct 4, 2020 by avibootz
1 answer 285 views
285 views asked Oct 3, 2020 by avibootz
...