Abstract
In this chapter, we will take a brief look at some of the commonly used classes in the Java libraries. The examples covered here are intended to be just a small sample of the possible set of classes that you might want to use. The main purpose of the chapter is to encourage you to reuse existing classes as much as possible in your programming, not to “reinvent the wheel.” One of the key things that object-oriented programming offers is the ability to reuse existing classes. Reuse has two major advantages. First, you save your own time by not having to implement the code. Second, code in standard libraries has already been extensively tested so there is no need to test it yourself. If you find yourself needing to perform a particular process or create a particular type of object, then you may find that a suitable implementation already exists in Java, particularly if the process or class could be considered to be a general purpose one rather than being domain specific. The most important thing is to become used to using the Javadoc as a frequent resource, checking to see what classes are in the library that you might be able to reuse before writing any new code.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2012 Springer-Verlag London Limited
About this chapter
Cite this chapter
Parsons, D. (2012). Exploring the Java Libraries. In: Foundational Java. Springer, London. https://doi.org/10.1007/978-1-4471-2479-5_11
Download citation
DOI: https://doi.org/10.1007/978-1-4471-2479-5_11
Published:
Publisher Name: Springer, London
Print ISBN: 978-1-4471-2478-8
Online ISBN: 978-1-4471-2479-5
eBook Packages: Computer ScienceComputer Science (R0)