1.  >>  河南成教 / 河南理工大学
 河南成教 / 河南理工大学


1[分析题]
试写出下面这个程序的执行结果.
class ExceptionTest {
static   String a[] = {"123", "abc", null};
  public static void main (String args[]) {
    for (int i = 0; i < 3; i ) {
        try {
        int x = Integer.parseInt(a[i]);
        System.out.println(  "Result: " x);
          }
        catch(NullPointerException e) {
           System.out.println("error null:");}
        catch (NumberFormatException e)
             {System.out.println("error:abc" );}

        finally{System.out.println ("In " i "th loop
");   }
      }   //end for
      }
}

  积分
 参考答案:
 佳题速递:
  • 大体积混凝土的裂缝按部位可分为:( ) 高层建筑施工
  • A: I'd love to, but I'll have something important to do then. B: What a pity! 英语口语
  • 合金元素Cr可以提高(),从而改善钢的耐蚀性机械工程材料
  • A mouse is a small device that a computer user pushes across a desk surface in order to point to a place on a _ _ _ _ _ _ _ _ _ and to select one or more action to take from that position.计算机专业英语
  • She often go to Nanjing. 大学英语(专)1
  • 关于内毒素,下述正确的是:医学微生物学和免疫学(护理专)