what is the difference between default and protected access level.
can we aceess the protected member (defined in superclass )using the instance of superclass
If the subclass is in a different package then we cannot access the protected member using the super class reference. we can access it only through inheritance. trying to access using super class reference gives compiler error
This is where you see the Object oriented ft..
You cannot access a protected member in other package directly. You have to use inhertance.
You have to use the subclass objecy...
system.out.println("xxxxxxx"+x); Here the implict this(subclass object) is allowing you to access
SCJP 6
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !