what if an abstract class having abstract method with package access is extended by a class outside the abstract class's package. will it be able to override the abstract method. if not then what about the rule that first concrete class have to provide implementation to all the abstract method???
Why don't you just try it out to see if it is possible or not?
To be able to override a method, the class that overrides the method must be able to access the method to be overridden. Since the original method has package access, do you think the subclass can access the method if it's in another package? So, do you think a subclass in another package would be able to override the method?
Jesper de Jong wrote:So, do you think a subclass in another package would be able to override the method?
@Madhurendra: And when you've answered Jesper's question, have a think about why you might want to write something like that (ie, a package-private abstract method).
Winston
"Leadership is nature's way of removing morons from the productive flow" - Dogbert
Articles by Winston can be found here
I'm just a poor boy, I need no sympathy, because I'm easy come, easy go, little high, little low, little ad
a bit of art, as a gift, that will fit in a stocking