Java Module Naming Rules Guide
In Java, modules are named according to the following rules:
- The name of the Module must be a valid Java identifier, meaning it can only contain letters, numbers, underscores, and dollar signs, and cannot start with a number.
- Module names should be in lowercase letters, and underscores or hyphens can be used to separate words when needed.
- The name of the Module should be descriptive, clearly expressing the function or purpose of the module.
- The name of the module cannot be the same as Java’s reserved keywords.
For example, a module named “my_module” follows the naming convention, while names like “module-1” or “module$” do not comply with the rules.