Write clean, consistent, and maintainable code
Each class must have a single, well-defined responsibility with cohesive methods and fields. Large classes with multiple concerns must be refactored into smaller, focused classes using composition or delegation patterns to improve maintainability and testability.
Methods should typically be no longer than 20-30 lines and focus on a single task. Long methods must be refactored into smaller, well-named private methods or extracted into separate classes to improve readability and testability.
Class names, method names, and variable names must clearly express their purpose using proper Java naming conventions (camelCase for variables/methods, PascalCase for classes). Avoid abbreviations, single-letter variables (except loop counters), and misleading names.