Object-oriented programming rests on four core principles — Encapsulation, Inheritance, Polymorphism, and Abstraction. Java is built around these, and understanding them is fundamental to designing Java programs.
1. Encapsulation — bundle data + hide internals
{
balance;
{
(amount > ) balance += amount;
}
{ balance; }
}
