摘要:
/*作者:qingfeng日期:2017/2/18功能:this,静态变量(类变量)*/class Demo3_2{ public static void main(String args[]) { Dog dog1 = new Dog(1, "黄黄"); Person p1 = new Perso 阅读全文
摘要:
//作者:qingfeng//2017/2/17//功能;理解类的成员方法和构造方法class CreatWays{ public static void main(String args[]){ Person p1 = new Person(23,"甲宝"); System.out.println 阅读全文
摘要:
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("小明的 阅读全文