Qus:    What is the difference between abstraction and encapsulation?
Apr 15, 2021 13:04 1 Answers Views: 397 JOSHUA
Prev Next
Answers (1)
RANJIT Dec 20, 2021 01:05
Answer:   Abstraction
It is a feature of OOPs. It is used to hide the unnecessary information or data from the user but shows the essential data that is useful for the user. It can be achieved by using the interface and the abstract class. In interfaces, only the methods are exposed to the end-user. The best example of abstraction is a TV remote. The user only interacts with the outer interface that is nothing but keys. The user only knows which key to press for what function.
It is also a feature of OOP. It is used to bind up the data into a single unit called class. It provides the mechanism which is known as data hiding. It is an important feature of OOPs. It prevents to access data members from the outside of the class. It is also necessary from the security point of view.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.

Let`s Connect