Naming Convention
About
Java Naming Conventions
1. Package Names
// Good
com.example.billing.invoice
org.companyname.product.module.submodule
com.uber.payment.gateway
org.example.hr.attendance
// Bad
com.Example.HRModule
com.uber_Payment2. Class and Interface Names
3. Enum Names and Constants
4. Method Names
5. Variable Names
6. Boolean Variables
7. Constants
8. Generic Type Parameters
9. Test Method Naming
10. Layer-Specific Naming Conventions (Optional but Helpful)
Layer
Naming Pattern
Example
General Guidelines
1. Avoiding Abbreviations and Acronyms
2. Reserved Keywords and Avoiding Collisions
3. Naming and Readability Trade-offs
4. Maximum Identifier Length in Java
5. Unicode and Non-ASCII Characters
Last updated