Organizing Your Code with Packages and Imports¶
โ Java 17
Real projects have dozens of classes. Java groups them into packages, like folders, and lets one class use another through imports. Here you'll learn both, plus how to compile and run classes that live in packages.
In this series¶
| # | Page | Reading time |
|---|---|---|
| 1 | Packages: grouping your classes | 3 min |
| 2 | Imports: using classes from other packages | 3 min |
| 3 | Lab: compiling and running packaged classes | 4 min |
๐ OCP 1Z0-829 candidates: exam traps and practice questions (optional)
Prerequisites: Writing Your First main() Method.