class Clidder { private final void flipper() { System.out.println("Clidder"); } } public class Clidlet extends Clidder { public final void flipper() { System.out.println("Clidlet"); } public static void main(String args[]) { new Clidlet().flipper(); } }
what result? To this question, I expected the answer “compilation will fail”, because the final method cannot be overridden, and it does not allow inheritance. but the answer was "Cliddet," why? I misunderstood something in this concept. How can this be the result? Explain, please.
source share