// X119SumNumberVersion2 --------------------------------------------------------

import javax.swing.JOptionPane;
import java.util.Scanner; //-- Scanner for input


public class X119SumNumbersVersion2
{
	public static Scanner keyboard = new Scanner( System.in );

	public static void main (String args[])


	{
		    System.out.printf( "Sum Two Numbers" );
		    System.out.printf( "(page 119/ problem 5)" );
		    System.out.println( );
		    System.out.printf( "AUTHOR:  " );
		    System.out.printf( "Corrales" );
    System.out.println( );

	String inputString;
    int first, second;	//-- declare numbers with integers

    inputString= JOptionPane.showInputDialog("Enter the Fisrt Value");	//-- input first number with a message box
    first = Integer.parseInt(inputString);
    inputString= JOptionPane.showInputDialog("Enter the second Value");    //--input second number with message box
	second = Integer.parseInt(inputString);

    int sum; //-- declare sum with integer

    sum=  first + second;

      System.out.print( "The sum is:  " );	//-- output
    System.out.println( sum );


	}
}












