Search:

Type: Posts; User: helloworld922

Search: Search took 0.09 seconds.

  1. Replies
    8
    Views
    1,167

    Re: Protected members

    @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...
  2. Replies
    8
    Views
    1,167

    Re: Protected members

    @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...
  3. Replies
    8
    Views
    1,167

    Re: Protected members

    @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...
Results 1 to 3 of 3