单项选择题

下面的哪些程序段可能导致错误 ( )
Ⅰ: String s = "Gone with the wind";
String t = "good ";
String k = s + t;
Ⅱ: String s = "Gone with the wind";
String t;
t = s[3] + "one";
Ⅲ: String s = "Gone with the wind";
String standard = s.toUpperCase();
Ⅳ: String s = "home directory";
String t = s-"directory":

A.Ⅱ、Ⅲ
B.Ⅱ、Ⅳ
C.Ⅰ、Ⅳ
D.Ⅲ、Ⅳ
热门 试题