What is the difference between "data hiding" and "encapsulation"?
- by Software Engeneering Learner
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?