Assignemnt #41, Using Swing for Imput

Code

      /// Name: Alex Pinder
      /// Period: 5
      /// Program Name: Using Swing for Imput
      /// File Name: prog41.java
      /// Date Complete: 11/6/15
      
      import javax.swing.*;
      
      public class prog41
      {
          public static void main ( String[] args )
          {
              String name = JOptionPane.showInputDialog( "What is your Name?" );
              
              String imput = JOptionPane.showInputDialog( "How old are you?" );
              int age = Integer.parseInt(imput);
              
              System.out.print( "Hello, " + name + ". " );
              System.out.println( "Next year, you'll be " + (age+1) );
              
              System.exit(0);
          }
      }
    

Picture of the output

Assignment 41 Assignment 41