Class invariants are conditions that must remain true for an object throughout its lifetime. They ensure consistency and correctness. For example, a `Product` class might have an invariant that the price must always be non-negative, ensuring that a product's pricing logic is never violated.
Additional Notes
How would you explain a class invariant in an interview?