Unless you have to use the array notation, you may want to look at theVector or ArrayList classes. They automatically handle resizing, butyou have to use the wrapper classes and casts (at least until Java 1.5is released).