Introduction
Any sophisticated Java application will require many separate Java classes. Java provides several ways to help you organize your classes; one of which is the concept of packages. You can collect multiple compiled packages together into a Java library, or a Java ARchive (JAR) file. Furthermore, you can use modules to provide a higher level of abstraction in your code, exposing only those elements that you consider appropriate.
When you start to create larger applications, you'll want to take advantage of Java's handy build tools—of which Maven and Gradle are the most popular. Build tools make it easier to build large projects that might depend on other projects and libraries. Build tools also provide standard ways to run tests, as well as packaging the project.
Both Maven and Gradle help significantly with the inclusion of third-party open-source libraries in your applications. There are thousands of such libraries available.