Can classes be declared protected?

Classes cannot be declared protected. This access modifier is generally used in a parent child relationship. In this example the class Test which is present in another package is able to call the addTwoNumbers () method, which is declared protected.
For More Information Please Refer:


You May Also Like to Read: