best answer > Can you override a private method in Java 2024?- QuesHub | Better Than Quora
The most authoritative answer in 2024
  • Harper Adams——Studied at the University of Zurich, Lives in Zurich, Switzerland.

    No, a private method cannot be overridden since it is not visible from any other class. You have declared a new method for your subclass that has no relation to the superclass method. One way to look at it is to ask yourself whether it would be legal to write super.func() in the Derived class.read more >>
    +119962023-05-09 12:30:15

About “private method、overridden、method”,people ask:

READ MORE:

QuesHub is a place where questions meet answers, it is more authentic than Quora, but you still need to discern the answers provided by the respondents.

分享到

取消