精选优质文档-倾情为你奉上字符串课后练习一、 选择题1、 运行下列程序段,S2的结果是(C)。String s1 = new String(“abc”);String s2 = “ef”;S2 = s1.toUpperCase().concat(s2);S2 = s2.substring(2,4);a) Cefb) cefc) Ced) BCe2、 运行下面的程序段,输出结果是(A)。String s1 = new String(“abc”);StringBuffer s2 = new StringBuffer(“abc”);S2.append(s1);S1.concat(“abc”);System.out.println(s1);a) Abcb) Abcabcc) 编译错误d) Abcabcabc3、 阅读下面代码段,错误代码段是()。Public class DemoPublic void showFavor(StringBuffer thing) /1Syst