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 193 views
193 views asked Sep 28, 2020 by avibootz
1 answer 282 views
282 views asked Oct 5, 2020 by avibootz
1 answer 547 views
547 views asked Oct 5, 2020 by avibootz
1 answer 307 views
307 views asked Oct 5, 2020 by avibootz
1 answer 234 views
234 views asked Oct 4, 2020 by avibootz
1 answer 199 views
199 views asked Oct 3, 2020 by avibootz
...