Could you use an ArrayList instead of an Array?
In the code below, I've defined an interface with a pre-valued List (since you indicated above that you might want to use an interface in this manner).
Then I defined a class implementing that interface, and used the List to initialize an
ArrayList. After that, I can add to the ArrayList as desired.
This code uses 1.5. But I think the only new feature here is the generics, so if you remove the type parameters <
String> it should work in 1.4.
[ February 10, 2005: Message edited by: marc weber ]