0
if protected is accessible by all the classes inside a same package and outside of the package too then what is the difference it does when compared to public?...
3 Antworten
+ 4
you can access superclasses protected members which are not a part of same package whereas you won't be able to go beyond package level with default access modifier.
+ 1
out of package it's accessible to Inherited classes .
0
in protected access modifier we can not access classes of another packages...but in public there is no restriction.