Getting to grips with the Java Module System
One of the main purposes of using a higher-order programming language such as Java is code reusability. A basic building block of the language is the concept of classes according to the principles of APIE. Java can localize these classes into groups defined by specific package names. The package concept encapsulates a group of classes. Classes can provide different levels of visibility to their internal fields and methods. Java specifies the following levels of visibility: public
, default, private
, and protected
. Keywords are used to reduce visibility across different packages to manage their interactions. The way to share a package across an application domain is to keep it public – that is, visible to everyone.
Java has been using the concept of class paths for many years. The class path is a special place where the Class Loader loads its classes. The loaded classes are then used at runtime (denoted as the Class Loaders Subsystem...