当前位置:SCJP程序员认证考试题库

问题:

[单选]

public class Test { 
public static void main(String [] args) { 
System.out.println(args.length > 4 && 
args[4].equals(“-d”)); 
} 
}  
If the program is invoked using the command line: java Test One Two Three –d  
What is the result?()  

A .  true
B .  false
C .  Compilation fails.
D .  An exception is thrown at runtime.

以下哪个是主域名?() www.xxx.com。 xxx.com。 ks.xx.com。 招标分为() 公开招标和邀请招标。 私密招标和邀请招标。 公开招标和被邀请招标。 私密招标和被邀请招标。 学前儿童科学教育材料 某公安机关通过网上聊天记录等破获一网络诈骗团伙,收缴赃款10万元,缴获大量金戒指.金项链.空白光盘等赃物。下列选项中正确的是()。 现金.金项链.金戒指等属于物证。 空白光盘属于物证。 网上聊天记录等属于视听资料。 网上聊天记录等属于电子数据。 烽火戏诸侯的() 周文王。 周武王。 周幽王。

public class Test { 
public static void main(String [] args) { 
System.out.println(args.length > 4 && 
args[4].equals(“-d”)); 
} 
}  
If the program is invoked using the command line: java Test One Two Three –d  
What is the result?()  

参考答案:

  参考解析

The correct answer to this question is D. The args[4] generates a runtime exception error because there are only 4 strings and the expression args[4] prints the 5th String but like it was said earlier, there are only 4 strings. 

在线 客服