Discussion Forum

What do you mean by data encapsulation?

What do you mean by data encapsulation?

by Jagmohan Upreti -
Number of replies: 1

What do you mean by data encapsulation?

In reply to Jagmohan Upreti

Re: What do you mean by data encapsulation?

by Ashutosh Bhatt -
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.