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 类的叙述,哪两项正确?()
AFile 类位于java.io 包中
B创建一个File 类的实例将导致打开指定文件进行读写
CFile 实例封装了指定文件的信息
DFile 实例不能用于封装目录
-
假设有字符串“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();