这个哪里错了?
//计算3个整数的乘积import javax.swing.JOptionPane;
public class mul3{
public void main(String args[])
{ String firstNumber;
String secondNumber;
String thirdNumber;
int number1;
int number2;
int number3;
int result;
firstNumber = JOptionPane.showInputDialog("输入第一个整数");
secondNumber = JOptionPane.showInputDialog("输入第二个整数");
thirdNumber = JOptionPane.showInputDialog("输入第三个整数");
number1 = Integer.parseInt(firstNumber);
number2 = Integer.parseInt(secondNumber);
number3 = Integer.parseInt(thirdNumber);
result = number1*number2*number3;
JOptionPane.showMessgeDialog(null,"结果是" + result,"求3个整数的乘积",
JOptionPane.PLAIN_MESSAGE);
}
} //编译倒数第3行出错
----------------解决方案--------------------------------------------------------
方法拼写错误,以后自己看仔细了再问!
----------------解决方案--------------------------------------------------------
颇有些俺的风格――粗心!呵呵……
----------------解决方案--------------------------------------------------------
呵呵 是啊 偶也有点粗心啊~不过我用jc来编写然后用记事本和cmd来编译
----------------解决方案--------------------------------------------------------
最好在main函数后加个throws Exception,最后一行的JOptionPane.showMessgeDialog改为JOptionPane.showMessageDialog就行了!
----------------解决方案--------------------------------------------------------