Print Statement in Java


☞To print something on the screen, we use the following statements in java.

System.out.print();
or
System.out.println();

"Hello World" Programs in Java

☞To understand the difference between above mentioned statement, try to print the "Hello World" using these statements.

1. Hello World

2. Hello World
   Hello World

3. Hello World

   Hello World

4. Hello WorldHello World
Note : Do not use escape sequences in your program.