Question OOP-ABS-0053
MediumWhat is the difference between abstraction and encapsulation?
- A.
Encapsulation is a design idea; abstraction is a keyword
- B.
They are exactly the same
- C.
Abstraction is only for interfaces; encapsulation only for classes
- D.
Abstraction hides complexity by showing only what is needed; encapsulation hides data by bundling it with methods and restricting access
Sign up free to see the answer and a step-by-step explanation.