Discussion Forum

What do you mean by data encapsulation?

Re: What do you mean by data encapsulation?

by Ashutosh Bhatt -
Number of replies: 0
Data encapsulation is a bundling the data, and the methods in Java. The data or variable should always be private, but method of function may be public. If we declare variable as private then it is called data hiding.