GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Concepts  >  OOPS

 Print  |  
Question:  what is the difference between encapsulation and datahiding.explain with example



April 04, 2006 19:46:05 #4
 Zahoor Ahmad Gorsi Database Expert  Member Since: April 2006    Total Comments: 7 

RE: what is the difference between encapsulation and d...
 

Encapsulation:

when u used format specifiers, public, private and protected. Basically u r defining scopes so encapsulating them.

Data Abstraction:

But when once u have made ur porgram, you dont give ur code to ur user but exe. so here ur hiding ur data .. this is often said as data abstraction.

so as a recall

PRIVATE PUBLIC = encapsulation

EXE not CODE = data abstraction.

     

 

Back To Question