try {
Integer a = new Integer("1234"); //no problem
a = new Integer("this is not a number"); //NumberFormatException
} catch (Exception e) // I want to catch all exceptions
{
e.printStackTrace(); //show the exception to console
}
Integer a = new Integer("1234"); //no problem
a = new Integer("this is not a number"); //NumberFormatException
} catch (Exception e) // I want to catch all exceptions
{
e.printStackTrace(); //show the exception to console
}
解决方案 »
- gbk转utf-8问题,看了好多帖但均没有很好的答案,请帮帮忙,
- 谁能帮我详细注释一下一个五子棋程序的方法体和类,其他的基本都注释了。
- eqauls与hashCode
- 考虑节省内存和提高速度,遍历指定目录下所有文本文件中所有出现单词的出现频率。
- Scanner报错,请高手看看!
- 输入输出流的问题
- 急求jspsmartupload.zip 能否给发一个 谢谢! (在线等)急啊!
- 关于处理待审核FAQ的办法,请各位给出自认为有价值的待审核FAQ,包括所属子版!
- 请问应该怎样在JDK中加入数据库的驱动程序?谢谢
- java中的socket为什么这么弱??!!
- Java可以用于串口并口通信的应用么?
- 一个小问题但是我解决不了所以求助
用过dephi?估计没有。就是说,系统或数据处理一旦发生错误,便会执行错误处理事件,不让系统出现错误提示。可以如楼上说的那样处理。
好像也可以使用throw