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

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

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

相关问题推荐

  • 以下哪个类与Swing GUI菜单类无关?() 

    A、JMenu

    B、JMenuBar

    C、JMenuItem

    D、以上皆是

  • 以下关于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

  • 现有:   1.  class Alpha { void m1() {} }   2.  class Beta extends Alpha { void m2() { } }   3.  class Gamma extends Beta { }   4.   5.  class GreekTest {   6.    public static void main(String [] args) {   7.      Alpha [] a = {new Alpha(), new Beta(), new Gamma() };   8.      for(Alpha a2 : a) {   9.        a2.m1();    10.       if (a2 instanceof Beta || a2 instanceof Gamma)    11.         //insert code here   12.     }    13.   }   14. }    哪一行代码插入到第11行,将编译但是会在运行时产生异常?() 

    A、 a2.m2();

    B、 ((Beta)a2).m2();

    C、 ((Alpha)a2).m2();

    D、 ((Gamma)a2).m2();

联系客服 会员中心
TOP