6.2 Program Units in Java
You’ve already been working with various program units in Java. You write programs by combining new methods and classes with predefined ones available in the Java Application Programming Interface (also referred to as the Java API or Java class library) and in various other class libraries. Related classes are typically grouped into packages so that they can be imported into programs and reused. You’ll learn how to group your own classes into packages in Section 21.4.10. Java 9 introduces another program unit called modules, which we discuss in Chapter 36, Java Module System and Other Java 9 Features.
The Java API provides a rich collection of predefined classes that contain methods for performing common mathematical ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access