What is Encapsulation in JAVA?, Computer, The Clairifiers

What is Encapsulation in JAVA?


Encapsulation is the hiding of data implementation. It means that the internal representation of an object is generally hidden from view outside of the object's definition. It is a wrapper, which prevents the code and data from being accessed by any other code defined outside the wrapper. Access to the data inside the wrapper is controlled through an interface.

For example, you take an exam and get your report card from your school. You don't have access to the entire process that teachers go through behind the scene from marking to collecting and adding marks to representing the marks on the report card. In this way, your school encapsulates the entire process and information; you interact with your teacher to get your report card.


Thank You So Much For Reading Till End!

Please share this post with your batch mates & whoever else needs this.

Post a Comment

Previous Post Next Post