Mike Manfrin
3
Q:

java how to print without going into newline

// newline while using System.out.print();
System.out.print("First Line\nSecond Line");
//output:
//First Line
//Second Line
0
System.out.println("<Your line here.>");
0
System.out.print("Hello World!");
System.out.print("Bonjour Le Monde!");
// output: "Hello World!Bonjour Le Monde!" (all in one line)
// the lines that are greyed out are comments and act as notes
0

New to Communities?

Join the community