欢迎来到计算机考试题库网 考试题库官网
全部科目 > Java认证考试 > SCJP程序员认证考试

单项选择题

public class foo {  
public static void main (Stringargs) { 
String s;  
system.out.printIn (“s=” + s);  
}  
}  
What is the result?()

    A. The code compiles and “s=” is printed.
    B. The code compiles and “s=null” is printed.
    C. The code does not compile because string s is not initialized.
    D. The code does not compile because string s cannot be referenced.
    E. The code compiles, but a NullPointerException is thrown when toString is called.

点击查看答案

相关考题