下面哪个结果是正确的?() public class Testjava{ public static void main(String[] args){ String s= "abcd"; String s1,s2; s1 =s.concat("e"); s2 = s1.replace('c','e'); System.out.println(s2); } }
A: Abcde
B: Abced
C: Abede
D: Abc
A: Abcde
B: Abced
C: Abede
D: Abc
举一反三
- public class Test { public static void main(String[] args) { String s1 = "abc"; String s2 = new String ("abc"); System.out.println(s1 == s2); } } 程序运行结果是
- 以下程序的输出结果是 String s1="1",s2="2"; String s=s1+s2; System.out.println(s);
- 读代码:public class foo {static String s;public static void main (String[]args) {System.out.println (“s=” + s);}}结果是
- 阅读以下代码: public class foo{ public static void main (String[] args){ String s; System.out.println("s=" + s); 输出结果应该是
- public static void main(String[] args) { String s1="123"; String s2 = "123"; System.out.println(s1==s2); } 输出的结果是________