abstraction and encapsulation..what is the differance?
Hi all,
i was learning Java basic fundamentals and got confused regarding one thing is...
Abstraction : process of hiding irrelevant details and exposing relevant one
Encapsulation : process of hiding members from the external world.
so it seems one and the same to me, can you please help me understanding the same?
also please give some examples so that this will get cleared in my mind.
Thanking in advance,
Regards,
vj
Re: abstraction and encapsulation..what is the differance?
Abstraction means making the callers or users of a piece of code independent from its the code's internal implementation. In other words, defining an API. Abstraction is the goal; encapsulation is the means.