下面的哪些程序片段可能导致错误()。 A.Strings=“Gonewiththewind”;Stringt=“good”;Stringk=s+t;B.Strings=“Gonewiththewind”;Stringt;t=s[3]+“one”;C.Strings=“Gonewiththewind”;Stringstandard=s.toUpperCase();D.Strings=“homedirectory”;Stringt=s–“directory”;
下面的哪些程序片段可能导致错误()。
A.Strings=“Gonewiththewind”;Stringt=“good”;Stringk=s+t;
B.Strings=“Gonewiththewind”;Stringt;t=s[3]+“one”;
C.Strings=“Gonewiththewind”;Stringstandard=s.toUpperCase();
D.Strings=“homedirectory”;Stringt=s–“directory”;
相关考题:
下面的哪些程序段可能导致错误? ( ) Ⅰ: 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.Ⅲ、Ⅳ
下面的哪些程序段可能导致错误? ( ) Ⅰ: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.Ⅲ、Ⅳ
请阅读下面的程序片段 int x = 3; if (x > 5) { System.out.print("a"); } else { System.out.print("b"); } 选择程序的运行结果()A.aB.bC.abD.编译错误
【单选题】下面的哪些程序片段可能导致错误A.String s = “Hello” ; String t = “World” ; String k = s+t ;B.String s = “hello” ; String t ; t = s[3]+”one” ;C.String s = “Hello” ;D.String s = “Hello world!” ;