Regards, Manish
SCJP 1.4
SCJP2. Please Indent your code using UBB Code
Regards, Manish
SCJP 1.4
The reasoning behind the restriction is this: Each subclass inherits the contract of the superclass and expands that contract in some way. Suppose that one subclass, as part of its expanded contract, places constraints on the values of protected members of the superclass. If a different subclass could access the protected members of objects of the first subclass then it could manipulate them in a way that would break the first subclass's contract -- and this should not be permissible.
Regards, Manish
SCJP 1.4
Regards, Manish
SCJP 1.4
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |