当前位置: 技术问答>java相关
为什末我的程序不能运行?大家帮忙看看!
来源: 互联网 发布时间:2015-04-07
本文导语: void jButton1_actionPerformed(ActionEvent e) { char inchar; System.out.print("Enter a Character:"); try{ inchar = (char)System.in.read(); System.out.println("You entered"+inchar); }catch(IOException e) { Syst...
void jButton1_actionPerformed(ActionEvent e) {
char inchar;
System.out.print("Enter a Character:");
try{
inchar = (char)System.in.read();
System.out.println("You entered"+inchar);
}catch(IOException e) {
System.out.println("Error reading from user");
}
}
运行的时候总是报错:"MyFrame.java": Error #: 469 : variable e is already defined in method jButton1_actionPerformed(java.awt.event.ActionEvent) at line 62, column 24
char inchar;
System.out.print("Enter a Character:");
try{
inchar = (char)System.in.read();
System.out.println("You entered"+inchar);
}catch(IOException e) {
System.out.println("Error reading from user");
}
}
运行的时候总是报错:"MyFrame.java": Error #: 469 : variable e is already defined in method jButton1_actionPerformed(java.awt.event.ActionEvent) at line 62, column 24
|
ActionEvent e
IOException e
两个e
IOException e
两个e
|
ActionEvent e)
IOException e)
:)
改}catch(IOException eee) {
IOException e)
:)
改}catch(IOException eee) {