Java The Complete Reference, Seventh Edition

(Greg DeLong) #1
Consider using a collection the next time that you need to store and retrieve information.
Remember, collections need not be reserved for only the “large jobs,” such as corporate
databases, mailing lists, or inventory systems. They are also effective when applied to smaller
jobs. For example, aTreeMapwould make an excellent collection to hold the directory
structure of a set of files. ATreeSetcould be quite useful for storing project-management
information. Frankly, the types of problems that will benefit from a collections-based solution
are limited only by your imagination.

502 Part II: The Java Library

Free download pdf