+ 1

How to print multiple lines with only one print command in Java?

I want to print as Hello Hi Welcome with one sentence of print command, System.out.println(); .Otherwise, how to line break?

14th Jun 2018, 5:21 PM
Phyo Thiha
Phyo Thiha - avatar
3 Respuestas
+ 2
System.out.println("Hello\nHi\nWelcome");
14th Jun 2018, 5:28 PM
Gopal Gautam
Gopal Gautam - avatar
+ 9
Here it is Phyo Thiha : System.out.println("Hello\nHi\nWelcome");
14th Jun 2018, 5:31 PM
***
+ 1
Thanks my brothers. Now I see as your best answers.
14th Jun 2018, 5:38 PM
Phyo Thiha
Phyo Thiha - avatar