本帖最后由 loading……99.9 于 2013-10-12 11:45 编辑
- public static void main(String[] args)
- {
- String str = "1111";
- StringBuffer arg = new StringBuffer("1111");
- char[]kk = {'q','w','e'};
- swap(str, arg, kk);
- System.out.println(str);
- System.out.println(arg);
- System.err.println(Arrays.toString(kk));
- }
- public static void swap(String str, StringBuffer arg,char[]kk)
- {
- str = "bbb";
- arg.append(333);
- kk[2] = 'w';
- }
复制代码 输出结果是什么?为什么呢?
|
|