xxxxxxxxxx
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
xxxxxxxxxx
public class DisplayMyDataInOneLine {
public static void main(String[] args) {
System.out.print("Hameed"+ "\n");
System.out.print("26"+ "\n");
}
}
xxxxxxxxxx
// newline while using System.out.print();
System.out.print("First Line\nSecond Line");
//output:
//First Line
//Second Line