@divcret protected is a superset of default. Access is allowed from subclasses even if they aren't in the same package. There's just a caveat as I noted above that you have to operate on the subclass...
Type: Posts; User: helloworld922
@divcret protected is a superset of default. Access is allowed from subclasses even if they aren't in the same package. There's just a caveat as I noted above that you have to operate on the subclass...
@syedbhai
That is perfectly legal because it invokes the super method show with type B (this is of type B). However, the object called with is still this, not a newly created ob object.
There...
@Alaa that is not the correct solution to this problem. un-qualifying the object operation on results in this.show() being executed. It does not execute show() for the object ob. Use of the dot...