摘要:
public static void show(Car c)//类类型的变量一定指向对象,否则就是null。 { c.num = 3; System.out.println(num+”…”); } 匿名对象:没有名字的对象 Car c = new Car();//有名字的对象 c.run(); new Car();//匿名对象,其实就是定义对象的简写格式 new Car().run();//只... 阅读全文
posted @ 2013-03-28 18:04
Juliesun
阅读(127)
评论(0)
推荐(0)
浙公网安备 33010602011771号