看板 Programming 關於我們 聯絡資訊
假設我原來有個class ex: car.. 有個static variable 叫 num_of_wheel 現在發現我要有很多種car 各有不同的 num_of_wheel. (每種車wheel的個數是一樣的..) 這樣透過 繼承override num_of_wheel 是一般的做法嗎 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 128.125.87.33
godfat:都叫 static 了,當然不能 override 220.128.121.85 07/30 10:32