class Test { public static void main(String[] args) { StringBuffer sb = new StringBuffer("jack"); sb.append(true); sb.append('a'); sb.append(97).append(34.0).append(new char[]{'A','B'}); // 链式编程 System.out.println( sb.toString() ); // 输出缓冲区的中文本数据 sb = new StringBuffer("jack"); sb.insert( 2, "java" ); System.out.println( sb.toString() ); } } A: jacktruea9734.0AB jjavaack B: jacktruea9734.0AB jajavack C: jacktrueaa34.0AB jajavack D: jacktruea9734AB jajavack
class Test { public static void main(String[] args) { StringBuffer sb = new StringBuffer("jack"); sb.append(true); sb.append('a'); sb.append(97).append(34.0).append(new char[]{'A','B'}); // 链式编程 System.out.println( sb.toString() ); // 输出缓冲区的中文本数据 sb = new StringBuffer("jack"); sb.insert( 2, "java" ); System.out.println( sb.toString() ); } } A: jacktruea9734.0AB jjavaack B: jacktruea9734.0AB jajavack C: jacktrueaa34.0AB jajavack D: jacktruea9734AB jajavack
5、下列程序的运行结果是()。public static void main( String[] args ){StringBuffer sb = new StringBuffer();sb.append("qq").append("ww");show( sb, "ss" );System.out.println( sb.length() );}public void show( StringBuffer sb, String str ){sb.append( str );} A: 4 B: 2 C: 6 D: 0
5、下列程序的运行结果是()。public static void main( String[] args ){StringBuffer sb = new StringBuffer();sb.append("qq").append("ww");show( sb, "ss" );System.out.println( sb.length() );}public void show( StringBuffer sb, String str ){sb.append( str );} A: 4 B: 2 C: 6 D: 0
分析下面的Java程序段,编译运行后的输出结果是( )。public class Test {public void changeString(StringBuffer sb) {sb.append("stringbuffer2");}public static void main(String[] args) {Test a = new Test();StringBuffer sb = new StringBuffer("stringbuffer1");a.changeString(sb);System.out.println("sb = " + sb);}} A: sb = stringbuffer2stringbuffer1 B: sb = stringbuffer1 C: sb = stringbuffer2 D: sb = stringbuffer1stringbuffer2
分析下面的Java程序段,编译运行后的输出结果是( )。public class Test {public void changeString(StringBuffer sb) {sb.append("stringbuffer2");}public static void main(String[] args) {Test a = new Test();StringBuffer sb = new StringBuffer("stringbuffer1");a.changeString(sb);System.out.println("sb = " + sb);}} A: sb = stringbuffer2stringbuffer1 B: sb = stringbuffer1 C: sb = stringbuffer2 D: sb = stringbuffer1stringbuffer2
下面是一段javabean 程序,该程序的运行结果是 ( ) 。public class NullTest{public static void main(String[] args){int M = 0;String str = null;StringBuffer sb = new StringBuffer(“= “);sb.append(str);sb.append(M++);System.out.println(sb.toString());}} A: =null B: =null0 C: =null1 D: =nullM
下面是一段javabean 程序,该程序的运行结果是 ( ) 。public class NullTest{public static void main(String[] args){int M = 0;String str = null;StringBuffer sb = new StringBuffer(“= “);sb.append(str);sb.append(M++);System.out.println(sb.toString());}} A: =null B: =null0 C: =null1 D: =nullM
public class Example { String str = new String("Java"); StringBuffer sb = new StringBuffer("C#"); public void strcat(String str, StringBuffer sb) { str = str + " study"; sb = sb.append(" exam"); } public static void main(String args[]) { Example ex = new Example(); ex.strcat(ex.str, ex.sb); System.out.println(ex.str); System.out.println(ex.sb); }}程序的输出结果是:______
public class Example { String str = new String("Java"); StringBuffer sb = new StringBuffer("C#"); public void strcat(String str, StringBuffer sb) { str = str + " study"; sb = sb.append(" exam"); } public static void main(String args[]) { Example ex = new Example(); ex.strcat(ex.str, ex.sb); System.out.println(ex.str); System.out.println(ex.sb); }}程序的输出结果是:______
下面的程序功能是实现字符串大小写的转换并倒序输出。public static void Main(string[] args){ string str = "HelloWorld"; ______ sb=new StringBuilder(); for (int i = 0; i &lt; str.______ ; i++) { if (str[i] >= 'a' && str[i] <= 'z') { sb.Append( str[i].ToString().ToUpper()); } else { sb.Append( str[i].ToString().______ ()); } } Console.WriteLine(sb.ToString()); Console.ReadKey();}[/i][/i][/i][/i]
下面的程序功能是实现字符串大小写的转换并倒序输出。public static void Main(string[] args){ string str = "HelloWorld"; ______ sb=new StringBuilder(); for (int i = 0; i &lt; str.______ ; i++) { if (str[i] >= 'a' && str[i] <= 'z') { sb.Append( str[i].ToString().ToUpper()); } else { sb.Append( str[i].ToString().______ ()); } } Console.WriteLine(sb.ToString()); Console.ReadKey();}[/i][/i][/i][/i]
填入适当的介词 deprive sb ________ sth rob sb _______ sth remind sb _______ sth notify sb _______ sth accuse sb ________ sth
填入适当的介词 deprive sb ________ sth rob sb _______ sth remind sb _______ sth notify sb _______ sth accuse sb ________ sth
通过append()在列表尾部添加元素的方法是() A: 列表.append(新值) B: append.列表 C: append(列表) D: append(index)
通过append()在列表尾部添加元素的方法是() A: 列表.append(新值) B: append.列表 C: append(列表) D: append(index)
wave to/at sb wave goodbye to sb
wave to/at sb wave goodbye to sb
呼吸性碱中毒中() A: AB>SB B: AB<SB C: A D: SB均正常 E: A F: SB均低于正常 G: A H: SB均高于正常
呼吸性碱中毒中() A: AB>SB B: AB<SB C: A D: SB均正常 E: A F: SB均低于正常 G: A H: SB均高于正常