- Free Courses
System.out.println(""); is used to print text in Java.
Between the quotes you can write a text you want to appear in the program. See example below.
System.out.println("This text will appear on screen.");
This text will appear on screen.
n to get mulible lines in your code.
You need to add
your text to get line shift. All text need to be inside
System.out.println("This text will appear on the screen.\nIt will span multiple lines.");
This text will appear on the screen.
It will span multiple lines.
No comments yet. You can be the first one to comment. Just write your comment in the form and click on the submit button.