String t="Hello World";
string[] t1=t. Split('o');
则t1中的值为:: "Hell Wrld"|"Hell"|"Hell" " W" "rld"|"Hell" "Wrld"
string[] t1=t. Split('o');
则t1中的值为:: "Hell Wrld"|"Hell"|"Hell" " W" "rld"|"Hell" "Wrld"
举一反三
- 下列语句执行后,s的值为______。String greeting=“Hello,everybody!”;String s=greeting.substring(0,4); A: Hell B: llo C: ello D: Hello
- 给出下列的代码,则以下哪个选项返回true String s="hello"; String t="hello"; char c []= {’h’,’e’,’1’,’1’,’o’};A)s.equals(t); A: t. equals( B: ; C: s==t; D: t==c;
- 下面的哪些程序片断可能导致错误?( ) 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,,;String standard = s.tollpperCase(); D: String s="Hello World”;String t=s-”World”;
- s=’helloworld’,s[4:]的值是() A: ’hell’ B: ’hello’ C: ’world’ D: world’
- s=‘helloworld’,s[-4:]的值是() A: hell B: hello C: world D: orld