What is the diffference between "data hiding" and "encapsulation"?
Posted
by
john smith optional
on Programmers
See other posts from Programmers
or by john smith optional
Published on 2012-11-04T10:05:11Z
Indexed on
2012/11/04
11:22 UTC
Read the original article
Hit count: 343
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 crate 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