// // print1 // // Author: Kenneth Chan // email : kjc@liverpool.ac.uk // Date : October 2010 // Description: program that demonstrates printing // class print1 { // // MAIN // public static void main( String args[] ) { System.out.print("this is print") ; System.out.print(" - notice that everything ") ; System.out.print("is on the same line\n") ; System.out.print( "\n\n" ) ; // alternative new line System.out.print( "\\n" ) ; // alternative new line System.out.print( "\n\n" ) ; // alternative new line System.out.println("this is println") ; System.out.println(" - now notice that everything ") ; System.out.println("appears on separate lines ") ; } }