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

题目内容 (请给出正确答案)
Stringa=ABCD”;Stringb=a.toLowerCase();b.replace(‘a’,‘d’);b.replace(‘b’,‘c’);System.out.println(b);Whatistheresult?()

A.abcd

B.ABCD

C.dccd

D.dcba

E.Compilationfails.

F.Anexceptionisthrownatruntime.


参考答案

更多 “ Stringa=ABCD”;Stringb=a.toLowerCase();b.replace(‘a’,‘d’);b.replace(‘b’,‘c’);System.out.println(b);Whatistheresult?() A.abcdB.ABCDC.dccdD.dcbaE.Compilationfails.F.Anexceptionisthrownatruntime. ” 相关考题
考题 classParent{Stringone,two; classParent{Stringone,two;publicParent(Stringa,Stringb){one=a;two=b;}publicvoidprint(){System.out.println(one);}}publicclassChildextendsParent{publicChild(Stringa,Stringb){super(a,b);}publicvoidprint(){System.out.println(one+to+two);}publicstaticvoidmain(Stringarg[]){Parentp=newParent(south,north);Parentt=newChild(east,west);p.print();t.print();}}Whichofthefollowingiscorrect?()

考题 Whichexpressionswillevaluatetotrueifprecededbythefollowingcode?()Stringa=hello;Stringb=newString(a);Stringc=a;char[]d={’h’,’e’,’l’,’l’,’o’}; A.(a==Hello)B.(a==b)C.(a==c)D.a.equals(b)E.a.equals(d)

考题 Stringa=null;a.concat(abc”);a.concat(def”);System.out.println(a);Whatistheresult?() A.abcB.nullC.abcdefD.Compilationfails.E.Thecoderunswithnooutput.F.Anexceptionisthrownatruntime.

考题 顺序执行下列程序语句后,则b的值是 String a="Hello"; String b=a.substring(0,2);A.HelloB.helloC.HeD.null

考题 顺序执行下列程序语句后,则b的值是( )。 String a=Hello: String b=a.substring(0,2);A.HelloB.helloC.HelD.null

考题 顺序执行下列程序语句后,则b的值是( )。 String a="Hello"; String b=a.substring(0,2);A.HelloB.helloC.HeD.null

考题 下面()可实现刷新当前页面。A.reload()B.replace()C.href()D.referrer

考题 下列代码的输出结果是什么? public static void main(String[] args) { String a = "110"; String b = "110"; String c = new String("110"); String d = new String(a); System.out.println(a == b); System.out.println(a == c); System.out.println(c == d); }A.true false falseB.true true trueC.true true falseD.编译错误

考题 下列字符串函数中不可用于返回子字符串的是()。A.LEFT()B.REPLACE()C.RIGHT()D.SUBSTRING()