What is the difference between "data hiding" and "encapsulation"?
Posted
by
Software Engeneering Learner
on Programmers
See other posts from Programmers
or by Software Engeneering Learner
Published on 2012-11-04T10:05:11Z
Indexed on
2012/11/05
23:18 UTC
Read the original article
Hit count: 250
I'm reading "Java concurrency in practice" and there is said: "Fortunately, the same object-oriented techniques that help you write well-organized, maintainable classes - such as encapsulation and data hiding -can also help you create thread-safe classes."
The problem #1 - I never heard about data hiding and don't know what it is.
The problem #2 - I always thought that encapsulation is using private vs public, and is actually the data hiding.
Can you please explain what data hiding is and how it differs from encapsulation?
© Programmers or respective owner