0

How can we write set of lines? Can someone tell me and explian the syntax for it?

System.out.println("thank you in advance");

25th Jan 2017, 5:12 PM
Divya Puttur
Divya Puttur - avatar
2 Réponses
+ 2
The best way to do so within one "Print" statement is to use "\n". This tells java to create a new line and post everything in the "Print" statement ona new line. Example: System.out.print("this is onnone line \n and this is on another");
25th Jan 2017, 5:16 PM
NickB
NickB - avatar
+ 1
thank you profTitan. I remember now in c language to we use "/n" to print other line. So this is also used in java.
25th Jan 2017, 5:19 PM
Divya Puttur
Divya Puttur - avatar