/*super不能在static下调用
*
*/
public class Textsuper {
public static void main(String[] args) {
Daugh d=new Daugh();
d.playPoke(" ");
}
}
class Mother {
int money = 1231232133;
String car = “hummar”;
public Mother() {
}
public int getMoney() {
return money;
}
public void setMoney(int money) {
this.money = money;
}
public String getCar() {
return car;
}
public void setCar(String car) {
this.car = car;
}
public void playPoke(String words) {
System.out.println("斗地主"+words);
}
}
class Daugh extends Mother {
int money=30;
@Override
public void playPoke(String words) {
System.out.println("变魔术"+words);
System.out.println(super.money);
System.out.println(super.getCar());
}
}