Scala FAQ: Can I create multiline strings in Scala, using something like a heredoc syntax?
Technically Scala doesn't refer to it as a heredoc syntax, but you can easily create multiline strings in Scala. All you have to do is enclose each end of your multiline string in three double-quotes, like this:
val foo = """Line 1.
Line 2.
Line 3."""
Here's an example of what this multiline string syntax looks like in a small example Scala application: