- Cursor stays on the same line when we use “print” command.
- Cursor goes to the following line when we use “println” command.
/*This program shows the difference between print and println */ public class secondFile{ public static void main(String[] args) { System.out.print("Java is a very protable language "); System.out.println("and can run different types of computers."); System.out.println("This is the next line !!!"); } } |