CJCoding With Joseph

Newline Inside a String

Using a SINGLE System.out.println() call, print two lines by placing a \n inside one string:

Line1
Line2

The \n breaks the string into two lines, and println adds the final newline.

Expected Output:

Line1
Line2
Topics:
Printing
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.