How to override/extend an inner class from a subclass?

后端 未结 3 1673
清歌不尽
清歌不尽 2021-02-03 19:44

I want to change how a method of a class executes without overriding the method, and only overriding (or ideally extending) the inner class. Assume that I cannot change the fact

3条回答
  •  花落未央
    2021-02-03 20:01

    You should be able to just extend the inner class with Thing extends A.Thing. As long as it's visible in your scope it shouldn't be a problem.

提交回复
热议问题