How to call an non overide method of child class using parent object reference

后端 未结 3 1697
生来不讨喜
生来不讨喜 2021-01-27 10:28

Here is my code want to access child class method of AdapterVer1 getAdaptObj1() (without type casting) using object reference of AdapterVersion (Parent class)

ab         


        
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-27 11:04

    You would need to move the method declaration to the abstract class.

提交回复
热议问题