Can a protected access modifier be applied on a class?

The protected access modifier can be applied on the data member, method and constructor. It can’t be applied on the class. It provides more accessibility than the default modifer. In this example, we have created the two packages pack and mypack. The A class of pack package is public, so can be accessed from outside the package.
For More Information Please Refer:

You May Also Like to Read: