Encapsulation hides the internal details of an object and only exposes necessary parts through a public interface. This ensures that the object's state is only modified in intended ways. For example, a `BankAccount` class might encapsulate its `balance` field, exposing only deposit and withdraw methods.
Additional Notes
Why does encapsulation in Java matter in practice?