2
Reply

Explain the difference between encapsulation and datahiding ?

Arjun Kumar

Arjun Kumar

Jul 06, 2012
2.7k
0

    data hiding is a technique of hide data from external world and encapsulation provide a way for implementation of desired level of data hiding using access specifiers like private ,public,protected,internal,protected internal

    In encapsulation you encapsulate function and data together in one unit (class). In data hiding you simply hide the data from external world. Only the member function can access the data.

    Ranjit Powar
    April 24, 2014
    0