A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

© lwj123   /  2015-5-23 09:29  /  13815 人查看  /  318 人回复  /   3 人收藏 转载请遵从CC协议 禁止商业使用本文

技术分带走
回复 使用道具 举报
领题来了啊
回复 使用道具 举报
最近么有福利么???
回复 使用道具 举报
领题的,看不到
回复 使用道具 举报
恩嫩  还的哦
回复 使用道具 举报
顶起。。。。
回复 使用道具 举报
求赏题求赏题求赏题
回复 使用道具 举报
看看先,。
回复 使用道具 举报
前来领题~,学习学习~
回复 使用道具 举报
啊啊,研究研究
回复 使用道具 举报
ven 中级黑马 2015-6-24 16:07:09
291#
领题,看会做不
回复 使用道具 举报
领题,大大给个简单点啊
回复 使用道具 举报
给我一份。。
回复 使用道具 举报
看看这个题呗
回复 使用道具 举报
我试试看我行不行!:)
回复 使用道具 举报
在try-catch-finally中,如果try-finally或者catch-finally中都有return,则两个return语句都执行并且最终  返回到调用者那里的是finally中return的值;而如果finally中没有return,则理所当然的返回的是try或者catch中return的值,但是  finally中的代码是必须要执行的,而且是在return前执行,除非碰到exit()。  例子:  public  class Test {      public static void main(String[] args) {         System.out.println(new Test().test());      }        static int test()      {         int x = 1;         try         {             return x;         }         finally         {             ++x;         }      }       }  ---------执行结果 ---------  1              public  class Test {      public static void main(String[] args) {         // TODO Auto-generated method stub         System.out.println(new Test().test());;      }         int test()      {         try         {             return func1();         }         finally         {             return func2();         }      }           int func1()      {         System.out.println("func1");         return 1;      }      int func2()      {         System.out.println("func2");         return 2;      }    }  -----------执行结果-----------------     func1  func2  2
回复 使用道具 举报
我也来凑凑热闹~~~
回复 使用道具 举报
看看。。。。。。。
回复 使用道具 举报
看看题~~~
回复 使用道具 举报
我来挑战一下。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马