StringBuffer deleteCharAt(int index)表示删除索引index-1处的字符
第1题:
Why we use StringBuffer when concatenating strings?
第2题:
设StringBuffer s=new StringBuffer("Sunday"),那么s.capacity( )的值为6
第3题:
Whichtwo scenarios are NOT safe to replace a StringBuffer object with a StringBuilder object?()
第4题:
关于 String、StringBuffer 和 StringBuilder 说法错误的是()
第5题:
StringBuffer append(数值类型 t),参数t可以是boolean、int、char、float、double、long
第6题:
下列关于字符串的描叙中错误的是()。
第7题:
String类和StringBuffer类的区别是什么?StringBuffer类提供了哪些独特的方法?
第8题:
Which methods from the String and StringBuffer classes modify the object on which they are called?()
第9题:
对
错
第10题:
When using versions of Java technology earlier than 5.0.
When sharing a StringBuffer among multiple threads.
When using the java.io class StringBufferInputStream.
When you plan to reuse the StringBuffer to build more than one string.
第11题:
第12题:
对
错
第13题:
5 string 和 stringbuffer的区别?
它们都是处理字符串的类,但是它们有一个最大的区别,那就是,String对象是存储你不能改动的文本字符
串,相反,如果你希望改动,则应使用StringBuffer类作为替换.
第14题:
举例说明String和StringBuffer的区别和应用场合。
第15题:
Public class test ( Public static void stringReplace (String text) ( Text = text.replace (‘j’ , ‘i’); ) public static void bufferReplace (StringBuffer text) ( text = text.append (“C”) ) public static void main (String args[]} ( String textString = new String (“java”); StringBuffer text BufferString = new StringBuffer (“java”); stringReplace (textString); BufferReplace (textBuffer); System.out.printLn (textString + textBuffer); ) ) What is the output?()
第16题:
StringBuffer reverse( )是将字符串倒序
第17题:
关于String和StringBuffer,下面那些是正确的:()
第18题:
STRING与STRINGBUFFER的区别是什么?
第19题:
关于String,StringBuilder以及StringBuffer,描述错误的是()。
第20题:
常量字符串使用String,非常量字符串使用StringBuffer。
使用StringBuffer的时候设置初始容量。
尽量使用StringTokenizer代替indexOf()和substring()。
尽量不要使用StringBuffer,StringTokenizer类。
第21题:
The charAt() method of the String class.
The toUpperCase() method of the String class.
The replace() method of the String class.
The reverse() method of the StringBuffer class.
The length() method of the StringBuffer class.
第22题:
第23题:
This code is NOT thread-safe.
The programmer can replace StringBuffer with StringBuilder with no other changes.
This code will perform well and converting the code to use StringBuilder will not enhance the performance.
This code will perform poorly. For better performance, the code should be rewritten: return “<“+ this.name + “>”;