Saturday, May 10, 2014

JAVA Protected Modifier Testing


Simple Note

A little bit confused by protected modifier in JAVA:

Test cases:
https://github.com/benbai123/JSP_Servlet_Practice/tree/master/Practice/JAVA/Commons/src/modifier/protectedtest

see derived class in packagea/packageb.

References

Controlling Access to Members of a Class
The protected modifier specifies that the member can only be accessed within its own package (as with package-private) and, in addition, by a subclass of its class in another package.

No comments:

Post a Comment