✏️ Explanatory Question
Static fields are variables declared using the static keyword. They belong to the class rather than to individual objects.
Example:
private static int counter;
Characteristics:
Only one copy exists per session.
Shared across all objects of the class.
Used for shared state or configuration data.
Static fields are useful when you need:
Global counters
Shared configuration values
Singleton instance storage
They reduce duplication and enforce centralized data management.