My understanding is that when a method is static in the super class then it couldnt be overridden it is hidden, when a method is private then it cannot be overridden.
You can override a method the declared private
you can declare the overriding method private, defult, protected or public
Rob
SCJP 1.4
private methods can't be overridden, besides understanding that they are not inherited[italics mine]
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
An inner class has access to all the methods of the outer class, even the private ones.
Rob
SCJP 1.4
You can actually call either, because the scope of the call is such that method m() is accessible to your show() method, whether you use the superclass' reference or not.
A class inherits from its direct superclass and direct superinterfaces all the non-private methods (whether abstract or not) of the superclass and superinterfaces that are accessible to code in the class and are neither overridden (�8.4.6.1) nor hidden (�8.4.6.2) by a declaration in the class.
If you like strawberry rhubarb pie, try blueberry rhubarb (bluebarb) pie. And try this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
|