Java program to print a multiline Hello World!

Views: 103   

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!
On By