黑马程序员技术交流社区

标题: 分享,Java经典笔试题03 [打印本页]

作者: heshiwei    时间: 2015-10-12 17:43
标题: 分享,Java经典笔试题03
class ExceptionTest{
           public static void main(String args[]){
                 try{
                       methodA();
                 }
                 catch(IOException e){
                       System.out.println("caught IOException");
                 }
                 catch(Exception e){
                        System.out.println("caught Exception");
                 }
            }
      }
答案回复可见



作者: maxwell247    时间: 2015-10-12 23:21
methodA是什么鬼?
作者: xiaoxiao147    时间: 2015-10-12 23:58
.....看不懂什么情况
作者: liuqianfly    时间: 2015-10-13 09:37
想知道是什么?
作者: ln0491    时间: 2015-10-13 10:37
methodA(); 什么鬼,还要回复
作者: heshiwei    时间: 2015-10-13 10:56
ln0491 发表于 2015-10-13 10:37
methodA(); 什么鬼,还要回复

不需要知道methodA(),只知道他会抛IOException就行了。
作者: heshiwei    时间: 2015-10-13 10:58
maxwell247 发表于 2015-10-12 23:21
methodA是什么鬼?

不需要知道methodA(),只需知道他可能抛IOException或者其他异常就成了。。
作者: 920792433    时间: 2015-10-13 12:46
不需要知道methodA(),只需知道他可能抛IOException或者其他异常就成了。。

有何用啊 ???
作者: maxwell247    时间: 2015-10-13 22:54
嗯。是的。小异常在前,大异常在后。
作者: 苯小孩hehe    时间: 2015-10-21 23:50
看看~~                  
作者: xiaotiejiang    时间: 2018-3-7 22:04
wretrytygfjhgsfsgfg




欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) 黑马程序员IT技术论坛 X3.2