关于StringBuffer类的代码的执行结果是? 为什么运行结果是AB.B

public class TestStringBuffer { public static void main(String args[]) { StringBuffer a = new StringBuffer("A"); StringBuffer b = new StringBuffer("B"); mb_operate(a, b); System.out.println(a + "." + b); } static void mb_operate(StringBuffer x, StringBuffer y) { x.append(y); y = x...
默认分类 | 2016-05-11 23:17 | 阅读 11803 次 | 评论 1 条

关于StringBuffer类的代码的执行结果是? 为什么运行结果是AB.B

public class TestStringBuffer { public static void main(String args[]) { StringBuffer a = new StringBuffer("A"); StringBuffer b = new StringBuffer("B"); mb_operate(a, b); System.out.println(a + "." + b); } static void mb_operate(StringBuffer x, StringBuffer y) { x.append(y); y = x...
默认分类 | 2016-05-11 23:17 | 阅读 9443 次 | 评论 0 条
浏览21239次
文章分类
文章归档