下列哪个叙述是错误的?
A. "9dog".matches("\\ddog")的值是true。
B. "12hello567".replaceAll("[123456789]+","@")返回的字符串是@hello@。
C. newDate(1000)对象含有的时间是公元后1000小时的时间
D. "\\hello\n"是正确的字符串常量。
对于如下代码,下列哪个叙述是正确的?publicclassE{publicstaticvoidmain(String[]args){StringstrOne="bird";StringstrTwo=strOne;strOne="fly";System.out.println(strTwo);}}
A. 程序编译出现错误。
B. 程序标注的【代码】的输出结果是bird。
C. 程序标注的【代码】的输出结果是fly。
D. 程序标注的【代码】的输出结果是null。
对于如下代码,下列哪个叙述是正确的?public class E { public static void main (String args[]) { String s1 = args[1]; String s2 = args[2]; String s3 = args[3]; System.out.println(s3); }}
A. 程序出现编译错误。
B. 无编译错误,在命令行执行程序:“java E I love this game”,程序输出this。
C. 无编译错误,在命令行执行程序:“java E let us go”,程序无运行异常。
D. 无编译错误,在命令行执行程序:“java E 0 1 2 3 4 5 6 7 8 9”程序输出3。
为一个boolean类型变量赋值时,可以使用()方式
A. boolean=0
B. booleana=(8>=9)
C. booleana="假"
D. booleana==true