Loading…

What is Encapsulation in Java? Explain

Encapsulation is one of the four OOP concepts. It is a way of wrapping variables and code on data as a single unit. The class variables are hidden from other classes, and can be accessed only through their current class. Therefore, this method is also called data hiding.

Suggest An Answer

No suggestions avaliable!

Latest post from Core Java interview questions

Ask Question