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 279 views
279 views asked Sep 28, 2020 by avibootz
1 answer 377 views
377 views asked Oct 5, 2020 by avibootz
1 answer 644 views
644 views asked Oct 5, 2020 by avibootz
1 answer 399 views
399 views asked Oct 5, 2020 by avibootz
1 answer 331 views
331 views asked Oct 4, 2020 by avibootz
1 answer 280 views
280 views asked Oct 3, 2020 by avibootz
...