try{
int b = System.in.read();
}
catch(Exception ex)
{
}
int b = System.in.read();
}
catch(Exception ex)
{
}
解决方案 »
- Java虚拟机
- @DeclarationNumber(0) 是啥意思?
- java如何获取定义的变量名,即JLabel firstName 中的firstName-有点难啊
- 高手帮我解读一下这个求幂集的程序,谢谢
- 关于System.in.skip( 1 )对后续的System.in.read();的读取影响,求解
- 扩展类方法
- JNI传递对象技术!(小弟要写一个接口程序,有经验者请赐教)
- 将String转为int的最简单方法是什么?比如"50"转换成int型的50?
- 请问Jbuild4.0版本的ID是多少?
- Netbeans中中文的设置
- 急!急!急! 一个JAVA初学者面对众多JAVA书籍的迷茫!
- COM輿JavaBean技術各有什麼優劣性?
int a = System.in.read();
^
1 errorProcess completed.
throws IOException啊?
int a = System.io.read();
int a = System.in.read();
int a = System.io.readln();
int a = System.in.readln();
int a = System.io.readlnteger();
int a = System.in.readlnteger();
}
catch(Exception e)
{
}或者public static void main(String[] args) throws Exception
must be caught or declared to be thrown就应该catch一下或throws一下了,
提示的还是很清的,java不像C++那样,它是强制性的,对错误捕捉。
为什么使用以下命令也没有问题呢?
System.iotools.readinteger();
System.out.println();
symbol : method read (java.lang.String)
location: class java.io.InputStream
int a = System.in.read("dqawefadfa");
^
1 errorProcess completed.