Assignemnt #41 and SwingForInput.java

Code

    /// Name: Boris Kazantsev
    /// Period: 6
    /// Program Name: SwingForInput
    /// File Name: SwingForInput.java
    /// Date Finished: 11/22/2015
    
    import javax.swing.*;
    
    public class SwingForInput{
        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

Assignment 41 Assignment 41 Assignment 41