1. 下面的哪一个程序片断可能导致错误。 ( )B 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();//toUpperCase()是一个将字符串中的所有字母都被转化为大写字母的函数 D. String s = "home directory"; s = s + "directory";
|