Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Can private method be overridden?

The private methods are not inherited by subclasses and you cannot be overridden by subclasses. According to Java Language Specification (8.4.8.3 Requirements in Overriding and Hiding), "Note that a private method cannot be hidden or overridden in the technical sense of those terms. This means that a subclass can declare a method with the same signature as a private method in one of its superclasses, and there is no requirement that the return type or throws clause of such a method bear any relationship to those of the private method in the sup...

3,446 0       JAVA PRIVATE METHOD OVERRIDDING IMPOSSIB