Oracle
1Z0-815 · Question #63
What is the name of the Java concept that uses access modifiers to protect variables and hide them within a class?
The correct answer is A. Encapsulation. Using the private modifier is the main way that an object encapsulates itself and hide data from the outside world.
Applying Encapsulation
Question
What is the name of the Java concept that uses access modifiers to protect variables and hide them within a class?
Options
- AEncapsulation
- BInheritance
- CAbstraction
- DInstantiation
- EPolymorphism
How the community answered
(24 responses)- A71% (17)
- B17% (4)
- C4% (1)
- D8% (2)
Explanation
Using the private modifier is the main way that an object encapsulates itself and hide data from the outside world.
Topics
#encapsulation#access modifiers#OOP concepts#data hiding
Community Discussion
No community discussion yet for this question.