How do I make a priority in Java? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

How do I make a priority in Java?

I recently started to try and code some Printed sentences. But when I try to code this (below) it only says 'matvapes!'?! How do I make it so there are 2 lines with a space in between of them. class Test { public static void main(String [ ] args) { System.out.println ("This is"); } } class Test { public static void main(String [ ]args) { System.out.println ("matvapes!"); } }

8th Feb 2018, 7:14 AM
Mr. Cat
Mr. Cat - avatar
1 Answer
+ 17
class Test { public static void main(String [ ]args) { System.out.println ("This is matvapes!"); //to print "This is matvapes!" System.out.print ("This is \n\nmatvapes!"); /*to print This is matvapes */ } }
8th Feb 2018, 7:22 AM
Gaurav Agrawal
Gaurav Agrawal - avatar