网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
publicStringmakinStrings(){Strings=Fred”;s=s+47”;s=s.substring(2,5);s=s.toUpperCase();returns.toString();}HowmanyStringobjectswillbecreatedwhenthismethodisinvoked?()

A.1

B.2

C.3

D.4

E.5

F.6


参考答案

更多 “ publicStringmakinStrings(){Strings=Fred”;s=s+47”;s=s.substring(2,5);s=s.toUpperCase();returns.toString();}HowmanyStringobjectswillbecreatedwhenthismethodisinvoked?() A.1B.2C.3D.4E.5F.6 ” 相关考题
考题 下面哪段语法执行正确() 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.Ⅲ、Ⅳ

考题 Whichtwocodefragments,insertedindependentlyatline3,generatetheoutput4247?() A.Strings=123456789;s=(s-123).replace(1,3,24)-89;B.StringBuffers=newStringBuffer(123456789);s.delete(0,3).replace(1,3,24).delete(4,6);C.StringBuffers=newStringBuffer(123456789);s.substring(3,6).delete(1,3).insert(1,24);D.StringBuilders=newStringBuilder(123456789);s.substring(3,6).delete(1,2).insert(1,24);E.StringBuilders=newStringBuilder(123456789);s.delete(0,3).delete(1,3).delete(2,5).insert(1,24);

考题 publicclassTestString3{publicstaticvoidmain(String[]args){//insertcodehereSystem.out.println(s);}}Whichtwocodefragments,insertedindependentlyatline3,generatetheoutput4247?() A.Strings=“123456789”;s=(s-”123”).replace(1,3,”24”)-“89”;B.StringBuffers=newStringBuffer(”123456789”);s.delete(0,3).replace(1,3,“24”).delete(4,6);C.StringBuffers=newStringBuffer(”123456789”);s.substring(3,6).delete(1,3).insert(1,“24”);D.StringBuilders=newStringBuilder(”123456789”);s.substring(3,6).delete(1,2).insert(1,“24”);E.StringBuilders=newStringBuilder(”123456789”);s.delete(0,3).delete(1,3).delete(2,5).insert(1,“24”);

考题 下列的哪个程序段可能导致错误? ( )A.String s="hello"; String t="good"; String k=s+t;B.String s="hello"; String t; t=s[3]+"one";C.String s="hello"; String standard=s.toUpperCase();D.String s="hello"; String t=s+"good";

考题 下面的哪些程序段可能导致错误? ( ) Ⅰ: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.Ⅲ、Ⅳ

考题 下列的( )程序段可能导致错误。A.String s="hello": Sting t="good"; String k=s+t;B.Sting s="hello"; String t; t=s [3] + "one";C.Sting s="hello"; String standard=s.toUpperCase( );D.String s="hello": Stringt s +"good";

考题 下列的哪个程序段可能导致错误?A.String s = "hello"; String t = "good"; String k = s + t;B.String s = "hello"; String t; t = s[3] + "one";C.String s = " hello "; String standard = s.toUpperCase( );D.String s = "hello"; String t = s + "good";