RE: what is the difference between encapsulation and d...
It is the mechanism that binds together code and data in manipulates, and keeps both safe from outside interference and misuse. In short it isolates a particular code and data from all other codes and data.
ex:
Class Base
{
int a=1;
Public void fun1{}
}
Abt data hiding,we access the data from a class in a secure way using the object.
RE: what is the difference between encapsulation and d...
Encapsulation is the inclusion all the resources needed for the object to function - basically, the method and the data.
information hiding is one technique used to accomplish encapsulation of an object.Information hiding is when you remove data, methods or code from a class's public interface in order to refine the scope of an object.
RE: what is the difference between encapsulation and d...
In simple terms, Encapsulation is am implementation of the data abstraction(data hiding). Data hiding is conceptual while encapsulation is how u implement that concept logically.