What is encapsulation in Java?

Last Updated :
Discuss
Comments

What is encapsulation in Java?

Wrapping data and methods into a single unit

Allowing multiple forms of a method

Inheriting properties from a parent class

Overriding methods from an interface

Share your thoughts in the comments