logo image

Java program to print a multiline Hello World!



Following program shows you how to print a multiline Hello World!. In this program we use \n for multi lines

public class Basic2 {

	public static void main(String[] args) {

		System.out.println("Hello \nWorld!");

	}

}

Output:

Hello 
World!