![](/img/trans.png)
[英]Java: Superclass to construct a subclass on certain conditions, possible?
[英]is it possible to make an atribute of a superclass static in a certain subclass?
因此,我有Store
各種子類。 他們都有rent
。 問題在於,一個特定的子類對於該類的所有實例具有相同的rent
,而其他子類可以是任意的。 這意味着所討論的班級Quiosque
具有靜態租金。 有沒有辦法使這種精確的屬性static
信息仍然Store
?
這是類圖。 rendaFixa是我所謂的rent
而renda就在那兒,因為我仍在思考該課程的處理方法。 我知道這很令人困惑,對不起
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.