This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
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.