An instance of a subclass is denied access for private features : private « Modifiers « SCJP





class MyClass {
   private double imaginary;
 }
 class MySubClass extends MyClass{
   MySubClass(double r, double i) {
     //real = r;            // Error!
   }
 }










3.2.private
3.2.1.private members can be accessed only by code in the same class.
3.2.2.A private variable or method may be used only by an instance of the class.
3.2.3.An instance of a subclass is denied access for private features