Encapsulation is hiding internal details of an object.
Encapsulation in Java involves keeping the internal state of an object hidden and exposing only necessary parts through public methods. This means using private fields and public methods to maintain control over how data is accessed and modified. For example, in an e-commerce application, a Product class might have private fields for `price` and `stock`, with public methods like `getPrice()` and `restock(int quantity)` to interact with these fields safely.