java交换两个变量的值 1.幼儿园版 package tst; public class Test { public static void main(String[] args) { String x = "xx"; String y = "yy"; exchange(x, y); System.out.println(); System.out.println(x+"<->"+y); } private static void…
Java 中的值传递和引用传递问题 public class Operation { int data = 50; void change(int data) { data = data + 100; } public static void main(String[] args) { Operation op = new Operation(); System.out.println("before change: " + op.data); op.change(200); Syst…