I'm currently taking my first Java class so bear with me.

The question actually reads: "Create a method to add and
subtract objects".

I assume this means I need to create an array and resize it when
the user wants, preserving the existing values.

---------------------
In Visual Basic it's:

'The next statement resizes the array and erases the elements.
Redim MyArray(10) ' Resize to 10 elements.

'The following statement resizes the array but does not erase
'elements.
Redim Preserve MyArray(15) ' Resize to 15 elements &
'keep existing values.
----------------------

How would I do this with Java?


I apologize for putting a school question here but I can't find
the answer in the text book.

Thanks in advance,
rlb_wpg