Creating Multiline Strings

In the following lesson, you will learn how to create multiline strings in Scala.

We'll cover the following

Problem

Imagine there’s a very long piece of text that you want the compiler to print. Or you have a list of items which need to be displayed vertically, item by item to make them easier to read. How would you go about creating multiple lines (multiline strings) within one string?

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy