Assignemnt #41 and Using Swing for Input

Code

 /// Name: Mark Katz
    /// Period: 6
    /// Program Name: Using Swim for Input
    /// File Name: Swing.java
    /// Date Finished: 10/5/15  

import javax.swing.*;
    
    public class Swing
    {
        public static void main (String[] args)
        {
            String name = JOptionPane.showInputDialog("What is your name?");
            
            String input = JOptionPane.showInputDialog("How old are you?");
            int age = Integer.parseInt(input);
            
            System.out.print("Hello, " + name + ".");
            System.out.println("Next year, you will be " + (age+1) );
            
            System.exit(0);
        }
    }
    

Picture of the output

Assignment41