All > Technology > Programming > Java
The practice of ensuring that only as much information is revealed about the implementation of a class as is strictly required. Hiding unnecessary knowledge of implementation makes it less likely that other classes will rely on that knowledge for their own implementation. This tends to reduce the strength of coupling between classes. It also reduces that chance that a change of the underlying implementation will break another class. Ensuring that all fields of a class are defined as
private
, is one of the ways that we seek to promote information hiding.- Browse Related Terms: Abstraction, accessor method, coupling, divide and conquer, factory pattern, floating point number, inconsistent state, information hiding, locale, mutator method, object-oriented design, pattern, singleton pattern, state, wrapper