易搜题 > 资格证大类 > 计算机编程 > 问题详情
问题详情

现有   1. class Calc {  2.  public static void main(String [] args) {   3.    try {  4.         int x = Integer.parselnt ("42a") ;   5.     //insert code here  6.         System.out.print ("oops");   7.    }   8.   }   9. }   下面哪两行分别插入到第五行,会导致输 "oops" ? () 

A

 } catch (IllegalArgumentException e) {

B

 } catch (IllegalStateException c) {

C

 } catch (NumbelFormatException n) {

D

 } catch (ClassCastException c) {

未找到的试题在搜索页框底部可快速提交,在会员中心"提交的题"查看可解决状态。 收藏该题
查看答案

相关问题推荐

  • 组件的getBounds()方法返回值的类型是哪项?()    

    A、 Dimension

    B、 Rectangle

    C、 Point

    D、 int[]

  • 以下关于File 类的叙述,哪两项正确?()

    A

    File 类位于java.io 包中

    B

    创建一个File 类的实例将导致打开指定文件进行读写

    C

    File 实例封装了指定文件的信息

    D

    File 实例不能用于封装目录

  • 假设有字符串“123”,能把该字符串变成整数的方法是哪几项?()

    A、Integer.parseInt(”123”)

    B、Float.parseFloat(“123”)

    C、Integer.valueOf(“123”).initValue()

    D、以上都不是

  • 在方法的声明中,要求该方法必须抛出异常时使用哪个关键字?()     

    A、 throw

    B、 catch

    C、 finally

    D、 throws

  • public classYippee{ public static void main(String[]args){ for(intx=1;xSystem.out.print(args[x]+""); } } } and two separate command line invocations:j avaYippee javaYippee1234 What is the result?()

    A、No output is produced. 123

    B、No output is produced. 234

    C、No output is produced. 1234

    D、An exception is thrown at runtime. 123

    E、An exception is thrown at runtime. 234

    F、An exception is thrown at runtime. 1234

联系客服 会员中心
TOP