Advertisement
calcpage

APCS_SHORTS_Hello3.java

Oct 4th, 2013
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.53 KB | None | 0 0
  1. /*
  2. Hello3.java MrG 2013.0927
  3. purpose:    playing with a GUI for user input
  4. required files: Hello3.java     main class
  5. translator: javac Hello3.java
  6. interpreter:    java Hello3
  7. */
  8.  
  9. //imported class
  10. import javax.swing.JOptionPane;
  11.  
  12. //main method
  13. public class Hello3
  14. {
  15.     public static void main(String[] args)
  16.     {
  17.         String name = JOptionPane.showInputDialog("name? ");
  18.         System.out.println("Hello, " + name + ", how about a nice game of chess?");
  19.         System.exit(0);
  20.     }
  21. }
  22.  
  23. //lower-case
  24. //UPPER_CASE
  25. //ProperCase
  26. //camelCase
  27.  
  28. //LAMP
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement