Tags | File and directory naming java |
Hard Prerequisites | |
IMPORTANT: Please review these prerequisites, they include important information that will help you with this content. | |
|
Directory names in Java should consistently use lowercase letters to maintain uniformity and adhere to Java conventions. This practice ensures that your project’s directory structure is clean and easy to work with. Additionally, when using tools like Gradle or Maven to set up your project, it’s advisable to follow the conventions they establish for directory structure, as they are designed to simplify project management and align with best practices.
See below for examples of naming your directories.
- src
- main
Java class names should be written in CamelCase, starting with an uppercase letter. Use meaningful and descriptive names that indicate the purpose of the class. For example: CarRentalSystem
, EmployeeManager
, StudentRecord
.
See below for some tips in naming your files.
- MyFile.java
- GoodJavaFilename.java
- KeepItShort.java
- MustBeMeangingful.java
├── src
└── main
| └── java
| └── StringCalculator.java
| └── Main.java
└── test
└── java
└── StringCalculatorTest.java