Private field in Java

ID: private-field-in-java

A field declared private is hidden from ordinary external source-level access. Library methods can enforce invariants and change the representation without exposing storage to clients. Returning a mutable internal object can still undermine this encapsulation in object-oriented programming.
// Destination: computer-science.bigb

New to topics? Read the docs here!