Which of the following is NOT an access modifier in Java?
2025
Which of the following is NOT an access modifier in Java?
Answer: D. accessible — ConceptAn access modifier is a Java language keyword placed in a declaration to control where a class or member can be accessed. For class members, Java…
- A.
public - B.
private - C.
protected - D.
accessible
Attempted by 340 students.
Show answer & explanation
Correct answer: D
Concept
An access modifier is a Java language keyword placed in a declaration to control where a class or member can be accessed.
For class members, Java provides the explicit modifiers public, protected, and private; package-private access is obtained by writing no access modifier.
Application
Classify each offered term by checking whether it is a Java keyword used to declare an access level.
Contrast of the offered values
publicis an explicit Java access modifier that allows the broadest visibility permitted by the declaration context.privateis an explicit Java access modifier that limits member access to the enclosing class.protectedis an explicit Java access modifier that permits package access and also supports subclass access subject to Java rules.accessibleis an English adjective used to describe reachability; it is not a Java access-modifier keyword.
Cross-check
Oracle Java documentation lists member access as public, protected, private, or package-private with no modifier. The word accessible does not appear in that modifier set.
Result
Therefore, accessible is the offered term that is not a Java access modifier.