Working with Existing Objects

OOP encourages reuse. If you develop an object for use with one Java programming project, it should be possible to incorporate that object into another project without modification.

Note

The author of this book, like many in his profession, is self-employed and works out of his home. Please keep this in mind when evaluating his advice on how to conduct yourself in the workplace.

If a Java class is well designed, it’s possible to make that class available for use in other programs. The more objects available for use in your programs, the less work you have to do when creating your own software. If there’s an excellent spell-checking object that suits your needs, you can use it instead of writing your own. Ideally, ...

Get Sams Teach Yourself Java™ in 24 Hours, Sixth Edition 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.