Slight confusion regarding overriding where variables are concerned

后端 未结 6 841
青春惊慌失措
青春惊慌失措 2020-11-28 11:40

I\'m preparing for the SCJP (recently rebranded as OCPJP by Oracle) and one particular question that I got wrong on a mock exam has confused me, the answer description doesn

6条回答
  •  春和景丽
    2020-11-28 12:06

    When methods are overridden, subclass methods are called, and when variables are overridden the superclass variables are used

提交回复
热议问题