aideliwu
发贴: 18
积分: 0
|
于 2004-09-01 14:15
我还是被
Exception in thread "main" Exit code: 1 There were errors
这个错误迷惑着啦,你能帮帮我吗,有人说我的 main 方法中
代码有误,可是我编译可以通过呀,但运行出错啦呀.
请帮我留意一下我的代码,耐心看一看,先谢谢你啦:
import java.io.*; public class NumberInput{ public static void main(String args[]) throws IOException { String s; InputStreamReader ir=new InputStreamReader(System.in); BufferedReader in=new BufferedReader(ir); s=in.readLine(); System.out.println("Input value is: "+s); int i=Integer.parseInt(s); i*=2; System.out.println ("Input value changed after doubled:"+i); } }
呵呵呵呵~辛苦啦~~帮帮我哦~~给我些解决的提示哈,
等待你的回音,^-^~^-^~
Please try to use the Edit function and check "Disable Smileys". I have corrected the typo for you. 啊啊啊~`我的代码~在我提交时~不小心~错啦一点小错误啦: 上代码中的 i=intInteger.parseInt(s); 在我原代码中是int i=Integer.parseInt(s);啦.
main中的错误应该是在其他地方啦~
why edited on 2004-09-01 20:47
|