单选题s=’helloworld’,s[4:]的值是()A’hell’B’hello’C’world’Dworld’
单选题
s=’helloworld’,s[4:]的值是()
A
’hell’
B
’hello’
C
’world’
D
world’
参考解析
解析:
暂无解析
相关考题:
publicclassX{publicstaticvoidmain(String[]args){strings=newstring(Hello”);modify(s);System.out.printIn(s);}publicstaticvoidmodify(Strings){s+=world!”;}}Whatistheresult?() A.Theprogramrunsandprints“Hello”B.Anerrorcausescompilationtofail.C.Theprogramrunsandprints“Helloworld!”D.Theprogramrunsbutabortswithanexception.
publicclassX{publicstaticvoidmain(Stringargs){strings=newstring(Hello”);modify(s);System.out.printIn(s);}publicstaticvoidmodify(Strings){s+=world!”;}}Whatistheresult?() A.Theprogramrunsandprints“Hello”B.Anerrorcausescompilationtofail.C.Theprogramrunsandprints“Helloworld!”D.Theprogramrunsbutabortswithanexception.
设原字符串s为StringBuffer型,且s="Hellojava",如果想用子串替换把s转换成"HelloWorld",则正确的语句是()A、s.replace(6,9,"World");B、s.replace(6,10,"World");C、s="World";D、s=replace("java","World");
下面是一段关于计算变量s的算法: ①变量s的初值是0 ②变量i从1起循环到n,此时变量s的值由下面的式子表达式计算 ③s=s+(-1)*i ④输出变量s的值 这个计算s值的算法中,s的代数式表示是()。A、1-2+3-4+…+(-1)n*(n-1)B、1-2+3-4+…+(-1)n-1*nC、1+2+3+4+...+(n-1)+nD、-1-2-3-4-...-n
单选题设原字符串s为StringBuffer型,且s="Hellojava",如果想用子串替换把s转换成"HelloWorld",则正确的语句是()As.replace(6,9,World);Bs.replace(6,10,World);Cs=World;Ds=replace(java,World);
多选题下面哪个语句是正确的()Ashort s=256;BString s=‘Helloworld’;Cint x=012;Dchar c=“a”;