Adding a Newline Character to a String

# Introduction In this lab, we will learn how to add a new line character to a string in Java. We will discuss different ways to add a new line, and explore the platform-dependent and platform-independent approaches for adding new lines. We will also learn about Java's line separator method and platform-independent newline character.

|60 : 00

Click the virtual machine below to start practicing