1.RuntimeException public class RuntimeException { public static void main(String[] args) { // TODO Auto-generated method stub String str="; int temp=Integer.parseInt(str); System.out.println(temp*temp); } } 查看parseInt方法的源代码如下: public static int pars
1. 引子 try…catch…finally恐怕是大家再熟悉不过的语句了,而且感觉用起来也是很简单,逻辑上似乎也是很容易理解.不过,我亲自体验的“教训”告诉我,这个东西可不是想象中的那么简单.听话.不信?那你看看下面的代码,“猜猜”它执行后的结果会是什么?不要往后看答案.也不许执行代码看真正答案哦.如果你的答案是正确,那么这篇文章你就不用浪费时间看啦. <span style="">package Test; public class TestException { pu