问题:
public static void main(String[] args) {
try {
args=null;
args[0] = “test”;
System.out.println(args[0]);
} catch (Exception ex) {
System.out.println(”Exception”);
} catch (NullPointerException npe) {
System.out.println(”NullPointerException”);
}
}
What is the result?()
A . test
B . Exception
C . Compilation fails.
D . NullPointerExceptio
public static void main(String[] args) {
try {
args=null;
args[0] = “test”;
System.out.println(args[0]);
} catch (Exception ex) {
System.out.println(”Exception”);
} catch (NullPointerException npe) {
System.out.println(”NullPointerException”);
}
}
What is the result?()
● 参考解析
本题暂无解析
相关内容
相关标签