October 2011
Beginner
432 pages
10h 18m
English
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 int and char, arrays, and String objects.
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.
The 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:
import java.util.Vector;
A vector holds objects that either belong ...
Read now
Unlock full access