Styrow.dev
Question 35 of 247
Java Topic: General medium

What is the difference between abstraction and encapsulation?

Question

What is the difference between abstraction and encapsulation?

Answer

• Abstraction- focuses on the outside view of an object (i.e. the interface)Encapsulation- (information hiding) prevents clients from seeing it’s inside view, where the behavior of the abstraction is implemented.

• Abstraction- solves the problem in the design side while Encapsulation- is the Implementation.

•Encapsulation- is the deliverables of Abstraction. Encapsulation barely talks about grouping up your abstraction to suit the developer needs.