今天试验了一个例子想要证明Java只有值传递但是没有引用传递,代码如下 class cat{ public int age; public String name; public cat(){ this.age = 0; this.name = "haha"; } public void setAge(int age){ this.age = age; } } public class test { public static void main(String[] arg...