Is it possible to override a static method in derived class?

后端 未结 7 1822
暗喜
暗喜 2020-11-28 13:33

I have a static method defined in a base class, I want to override this method in its child class, is it possible?

I tried this but it did not work as I expected. Wh

7条回答
  •  感动是毒
    2020-11-28 14:28

    In Java, static method lookups are determined at compile time and cannot adapt to subclasses which are loaded after compilation.

提交回复
热议问题