Can a Parent call Child Class methods?

前端 未结 3 1764
野的像风
野的像风 2020-12-02 17:23

Referring here

A is a precompiled Java class (I also have the source file) B is a Java class that I am authoring
B extends A.

How can logic be implemen

3条回答
  •  醉酒成梦
    2020-12-02 17:58

    I would be rather hesitant to do this. Please correct me if I am wrong and then I will delete, but it sounds like you want to maintain an A object along with a B object. If they indeed are not the same object, the "tying together" (that's a scientific term) you'll have to do would be pretty ugly.

提交回复
热议问题