/////////////////////////////////////////////////////////////////////////////// //Main Class File: HelloName.java //File: HelloName.java //Semester: Fall 2012 // //Author: Alicia Maxwell ////////////////////////////80 columns wide ////////////////////////////////// import javax.swing.JOptionPane; //allow access to the Dialog Box classes /** * Aquire the users's name with a dialog box, then print "Hello, Name!" * @author Alicia Maxwell */ public class HelloName { /** * Get user's name and print a welcome message. * @param args - Command line arguments * @return void */ public static void main(String[] args) { //ask the user for their name String name= JOptionPane.showInputDialog("What is your name?"); //print out the message System.out.println("Hello " + name + "!"); //end the program when the last message box closes System.exit(0); }//end main }//end class