An important decision to make when writing a computer program is where to store data. In the first half of this book, you’ve found three useful places to keep information: basic data types such as
char, arrays, and
Any Java class can hold data. One of the most useful is
Vector, a data structure that holds objects of the same class.
Vectors are like arrays, which also hold elements of related data, but they can grow or shrink in size at any time.
Vector class belongs to the
java.util package of classes, one of the most useful in the Java class library. An
import statement makes it available in your program:
A vector holds objects that either belong ...