9 Packages and Interfaces
9.1 INTRODUCTION
A packing is a grouping of related types providing access protection and name space management. Note that all types refer to classes and interfaces. Many a time while working on a small project, one thing that is intended to do is to put all Java files into a single directory. It is quick, easy and harmless. However, if the small project gets bigger and the number of files keeps on increasing, putting all these files into the same directory and managing them would be a difficult task. In Java, this sort of problem can be avoided by using package.
Packages are nothing more than the way files are organized into different directories according to their functionality, usability as well as category they ...
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