← Quiz: Encapsulation and Abstraction: all 10 questions
Quiz: Encapsulation and Abstraction · Question 1 of 10
Making a field private and allowing changes only through a method that validates input is:
Making a field private and allowing changes only through a method that validates input is:
- A.Encapsulation
- B.Inheritance
- C.Polymorphism
- D.Abstraction
Answer & explanation
Correct answer: Encapsulation
Protecting data behind controlled access is encapsulation.
Can you get the rest right without peeking?
Take the timed Quiz: Encapsulation and Abstraction quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →