為什么用靜態(tài)的不對(duì)
public static function speedUp(){
? ? ?// $this->speed+=10;
? ? ?// $this->speed=speed+10;
? ? ? Car::$speed()+=10; ?}
}
為什么不對(duì)?。?/p>
public static function speedUp(){
? ? ?// $this->speed+=10;
? ? ?// $this->speed=speed+10;
? ? ? Car::$speed()+=10; ?}
}
為什么不對(duì)?。?/p>
2016-08-04
舉報(bào)
2016-08-04
多了括號(hào),應(yīng)該是self::$speed+=10;