为什么结果money是NULL啊 不是赋值了么
package project;
public class InitialCar {
public static void main(String[] args) {
// TODO Auto-generated method stub
Car car=new Car();
car.num="冀6666";
car.name="奔驰";
car.money=4000000;
car.drive();
}
}
另一个代码:
package project;
public class Car extends AutoMobile {
//double money=3000000;
public void drive(){
System.out.println("奔驰代步");
}
public Car (){
System.out.println("name"+name+"money"+money+"Car类执行了");
}
public void qwe(){
System.out.println(super.money);
}
}