2.10 Class Methods
Introduction
A class method (declared `static`) belongs to the class itself, not to any object, and can be called without creating an instance. Class methods typically operate on class (static) data or provide utility functionality unrelated to any specific object's state — like `Integer.parseInt(...)` or `Math.max(...)`.
Key Concepts
Java Syntax
Code Examples
`square` doesn't depend on any object's state, so it's declared `static` and called directly via the class name, with no `new MathHelper()` required.