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 384 views
384 views asked Oct 5, 2020 by avibootz
1 answer 652 views
652 views asked Oct 5, 2020 by avibootz
1 answer 407 views
407 views asked Oct 5, 2020 by avibootz
1 answer 335 views
335 views asked Oct 4, 2020 by avibootz
1 answer 286 views
286 views asked Oct 3, 2020 by avibootz
...