IN THIS CHAPTER
Finding out more about classes
Discovering other helpful classes
I’m proud of myself. I’ve written around 400 pages about Java using fewer than 30 classes from the Java API. The standard API has thousands of classes, so I think I’m doing very well.
Anyway, to help acquaint you with some of my favorite Java API classes, this chapter contains a brief list. Some of the classes in this list appear in examples throughout this book. Others are so darn useful that I can’t finish the book without including them.
For more information on the classes in this chapter, check Java’s online API documentation at
Chapter 16 introduces arrays. This is good stuff, but in any programming language, arrays have their limitations. For example, take an array of size 100. If you suddenly need to store a 101st value, you’re plain out of luck. You can’t change an array’s size without rewriting some code. Inserting a value into an array is another problem. To squeeze
"Tim" alphabetically between
"Tom", you may have to make room by moving thousands of
But Java has an
ArrayList class. An
ArrayList is like an array, except that
ArrayList objects grow ...