import javax.swing.JOptionPane;
public class Addition{
public static void main(String args[])
{
String firstNumber,
secondNumber;
int number1,
number2,
sum;
JOptionPane.showInputDialog(
"Enter first integer");
number1=Integer.parseInt(firstNumber);
number2=Integer.parseInt(SecondNumber);
sum= number1+number2;
JOptionPane.showMessageDialog(
null,"The sum is"+sum,"Results",
JOptionPane.PLAIN-MESSAGE);
System.exit(0);
}
}
谢谢啦