Java Foundations — Question 69

Which two Java reserved words are used to implement encapsulation?

Answer options

Correct answer: C, E

Explanation

The keywords 'public' and 'private' are used to control access to classes and their members, which is the essence of encapsulation. 'Final' and 'static' serve different purposes, such as preventing changes to variables or methods and indicating class-level variables or methods, while 'extends' is related to inheritance, not encapsulation.