為什么用靜態的不對
public static function speedUp(){
? ? ?// $this->speed+=10;
? ? ?// $this->speed=speed+10;
? ? ? Car::$speed()+=10; ?}
}
為什么不對???
public static function speedUp(){
? ? ?// $this->speed+=10;
? ? ?// $this->speed=speed+10;
? ? ? Car::$speed()+=10; ?}
}
為什么不對???
2016-08-04
舉報
2016-08-04
多了括號,應該是self::$speed+=10;