1.5 Assignments
Introduction
The assignment operator `=` stores the value of the expression on its right into the variable on its left. Java also provides compound assignment operators (`+=`, `-=`, `*=`, `/=`, `%=`) that combine an operation with an assignment in a single step.
Key Concepts
Java Syntax
Code Examples
`total` starts at 0, gains 10, then 5 (total = 15), then doubles (total = 30) via `*=`.