题目内容

下面代码的输出结果是String tenCharString = "AAAAAAAAAA";System.out.println(tenCharString.replace("AAA","KKK");

AAAAAAAAAA
B. KKKAAAAAAA
C. KKKKKKKKKA
D. KKKKKKKKKK

查看答案
更多问题

执行下面代码后,下面叙述正确的是:String typeOfDog = "Mini Australian Shepherd";typeOfDog = null;System.out.println(typeOfDog.length());

A. 抛出NullPointerException异常
B. 抛出RuntimeException异常
C. 抛出IllegalArgumentException异常
D. 产生编译错误

执行下列语句后输出的结果是()。String s = "\"Hello,World!\"";System.out.println(s.length());

A. 12
B. 14
C. 16
D. 18

执行下列语句后输出的结果是()。String foo = "ABCDE";foo.substring(3);foo.concat("XYZ");System.out.println(foo);

ABCDE
B. DEXYZ
C. XYZ
DE

执行下列语句后输出的结果是String s = "\"Hello,World!\"";System.out.println(s);

A. 14
B. "Hello,World!"
C. \"Hello,World!\"
D. Hello,World!

答案查题题库