Tuesday, October 14, 2008

Difference between Encapsulation & Abstraction OOPS

Difference between Encapsulation & Abstraction OOPS

Abstraction is virtual class design.

Before actually defining class, developer will think about what all properties,methods and event will be there in my class.

Whereas,encapsulation is data hiding.

At the time of class defenation,developer will think about which should display to end user and which should not.

In Short Abstraction is "Collection of data" and Encapsulation is "Exposure (or grouping) of data in appropriate access specifier".

No comments: