is it possible to have a multi-line display in console without having to write its text in several methods :system.out.println() | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

is it possible to have a multi-line display in console without having to write its text in several methods :system.out.println()

I'll would to know how to have the same output result in multi-line as follows: system.out.println("hello I'm happy to code");//output: hello I'm // first ligne happy //second ligne to code // third ligne

14th Jun 2019, 2:04 AM
jurise mboumene
jurise mboumene - avatar
2 Answers
+ 3
use \n line separator System.out.println("hello I'm happy \nto code");
14th Jun 2019, 2:23 AM
zemiak
+ 1
thank I have try and it's walk
14th Jun 2019, 2:30 AM
jurise mboumene
jurise mboumene - avatar