public class Test{
public static void main(String[] args) {
StringBuffer buffer = new StringBuffer("today");
String str = new String(buffer);
buffer.append("-");
str.replace("a","o");
System.out.println(buffer+str);
}
}
结果是什么 ,为什么?
...全文
63318打赏收藏
请问高手java
public class Test{ public static void main(String[] args) { StringBuffer buffer = new StringBuffer("today"); String str = new String(buffer); buffer.append("-"); str.replace("a","o"); System.out.println(buffer+str); } } 结果是什么 ,为什么?