If the method to be overridden has access type 'protected', can subclass have the access type as 'private'?

No, it must have access type as protected or public, since an overriding method must restrict access of the method it overrides.


Kavita on May 19, 2011 at 10:14 AM said...

So here you mean we cannot reduce the visibility of inherited method.

Anonymous said...

i didnt understand the logic here..can u please xplain in detail


Interview Questions On Java,Java EE Copyright © 2018. Reads: best tracker