Kkush Garg wrote:member with package access are not inherited
OCPJP6-05-11
"Your life is in your hands, to make of it what you choose."
Kkush Garg wrote: i know that an concrete class must implement all abstract methods from the superclass but implementing an abstract method is like overriding and why we should override
the method even it is not inherited.......
then two.jR3 should be allowed to override showIt() of one.jR2......
Kkush Garg wrote:i agree with this that all members are actually inherited in the subclass including private members mathew sir ,, but i still not able to digest the code because
then two.jR3 should be allowed to override showIt() of one.jR2......
Paul Clapham wrote:(I haven't considered what happens if two.jR3 tries to override the showIt() method with an abstract method. Left as an exercise for the interested student.)
Matthew Brown wrote:Though why you might want to do that is another matter.
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
|