black

SCJP程序员认证考试

登录

单项选择题

public class Yippee2 { 
static public void main(String [] yahoo) { 
for(int x= 1; xSystem.out.print(yahoo[x] + “ “); 
} 
} 
} 
and the command line invocation: java Yippee2 a b c What is the result?() 

 

A.a b
B.b c
C.a b c
D. Compilation fails.
E. An exception is thrown at runtime.

相关考题

单项选择题 public class Yippee {  public static void main(String [] args) {  for(int x = 1; x < args.length; x++) {  System.out.print(args[x] +“ “);  }  }  }  and two separate command line invocations:  java Yippee  java Yippee 1234  What is the result?()

单项选择题 Given the command line java Pass2 and:  public class Pass2 {  public void main(String [] args) {  int x=6;  Pass2 p = new Pass2();  p.doStuff(x);  System.out.print(” main x = “+ x); }  void doStuff(int x) {  System.out.print(” doStuffx = “+ x++);  }  }  What is the result?()

单项选择题 Given a correctly compiled class whose source code is:  package com.sun.sjcp;  public class Commander {  public static void main(String[] args) {  // more code here  }  }  Assume that the class file is located in /foo/com/sun/sjcp/, the current directory is /foo/, and that the classpath contains “.“ (current directory). Which command line correctly runs Commander?()

All Rights Reserved 版权所有©考试题库网(kstiku.com)

备案号:湘ICP备14005140号-3

经营许可证号:湘B2-20140064