Advertisement
smeacham

PrintTester.java

Jan 26th, 2015
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1. public class PrintTester
  2. {
  3.    public static void main(String[] args)
  4.    {
  5.       System.out.println(3 + 4); // Prints 7
  6.      
  7.       System.out.println("Hello"); // Prints "Hello World!" in two lines
  8.       System.out.println("World!");
  9.  
  10.       System.out.print("00"); // Prints 00 but doesn't start a new line
  11.       System.out.println(3 + 4); // Prints 7 and starts a new line
  12.  
  13.       System.out.println("Goodbye");
  14.    }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement