一道java笔试题

xiaoxiao2021-03-01  33

请问以下输出是什么?,请写明原因。

public class Test { public static void main(String[] args) throws Exception { StringBuilder a= new StringBuilder("A"); StringBuilder b= new StringBuilder("B"); exchange(a,b); System.out.println(a + "." + b); } public static void exchange(StringBuilder x, StringBuilder y) { x.append(y); y=x; } }

 

转载请注明原文地址: https://www.6miu.com/read-4049967.html

最新回复(0)