B
File Utilities
It is generally agreed upon that one should not write “utility” code every time one
writes a new program. The first time one writes code for some purpose in a given
program, it is new code and must be written. The second time one writes much
the same code in a different place, the idea of creating a method for that purpose
should be considered, and certainly by the third time the same code is written, it’s
time to write one method with parameters and to get that method right. Obviously
it’s a method that is common to the computation as a whole, so the code should
be standardized.
Almost nowhere is this principle more evident than in the ...

Get Data Structures Using Java now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.