-
Can a class be declared with protected modifier?
-
- False
- True
- NA
- NA
- NA
Correct Option: A
Protected class member (method or variable) is like package-private (default visibility), except that it also can be accessed from subclasses. Since there is no such concept as ‘subpackage’ or ‘package-inheritance’ in Java, declaring class protected or package-private would be the same thing.