摘要:
public class Lei
{
public static void main(String args[]){
Person a = new Person();
a.age = 22;
a.name = "小明";
Person b;
b = a;
System.out.println("小明的年龄:"+b.age);
System.out.println("小明的名字:"+b.name);
Person c;
c = b;
System.out.println("小明的年龄:"+c.age);
System.out.println("小明的名字:"+c.name);
System.out.println("Coding changes the world !");
c.age = 100; //改变一个 全部的值都改变!说明其指向同一个空间! //引用传递
System.out.println("小明的年龄:"+a.age);
System.out.println("小明的 阅读全文
posted @ 2017-02-14 21:11
清风追梦enjoy
阅读(172)
评论(0)
推荐(0)

浙公网安备 33010602011771号