若变量s是String类型的数据,那么表达式(s+s)的类型是()
A. char
B. string
C. int
D. long
查看答案
若有定义String answer ="少年强则国强!";则answer.length()的值是()
A. 7
B. 8
C. 9
D. 14
若有定义String key ="我是信工学院的学生";则key.length()的值是
A. 0
B. 9
C. 10
D. 18
执行StringBuffer s = new StringBuffer("abc"); s.insert(1,"Good"); s的正确结果是()
A. s="aGoodbc"
B. s="abcGood"
C. s="Goodabc"
D. s="abGoodc"
下面哪段语法执行正确? (多选)
A. String s = "Gone with the wind";String t = " good ";String k = s + t;
B. String s = "Gone with the wind";String t;t = s[3] + "one";
C. String s = "Gone with the wind";String standard =s.toUpperCase();
D. String s = "home directory";String t = s - "directory";