Jun 09 2009

The difference between print and println

Category: Javaadmin @ 10:51 pm

  • 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 !!!");
	}
}

Tags:

Leave a Reply