Encapsulation is
a process of binding or wrapping the data and the codes that operates on the
data into a single entity. This keeps the data safe from outside interface and
misuse. Encapsulation is implemented using private, package-private and
protected access modifier.
Encapsulation is also called data hiding.
Abstraction is the process of abstraction in Java
is used to hide certain details and only show the
essential features of the object. In other words, it deals with the
outside view of an object (interface).
Abstraction can be achieved using interface and
abstract class.
Hide certain details and only show the essential features of the object
No comments:
Post a Comment