You can store things in a 1-dim dynamic ArrayList. Then convert the list to a 1-dim array.
I forgot to create a new Object at (*). For some reason, I lost the first array. But I am too sleepy to figure out why.
Joined: Oct 10, 2004
Actually I also figured similar code through vectors:
Joined: Mar 05, 2003
Abhi, did you know that Vector is a "legacy" container class. It has been retrofited to be a part of the Java API collections framework. All methods that access the contents of a Vector are synchronized.
My impression is in books authors use ArrayList instead of Vector. I'd use ArrayList unless I really wanted synchronized methods.