Programming Concepts

Which Java access modifier allows visibility only within the same class?

Correct answer

B. private

Explanation

Private members are accessible only within the class where they are declared.