CSCI 1301 – Lab 30

Clément Aubert

November 18, 2019

Copying an Array of int

You can first have a look back at lab 29 to understand why

int[] orig = { 1, 2, 3, 4, 5 };
int[] arrayCopyWrong = orig;

is not the appropriate way to copy an array.

Then, like we did in class:

Once you are done with this, write two other copy methods taking only one argument: one for arrays of decimals, and one for arrays of strings. Can you give them the same name as for the one that takes arrays of integers as arguments? Why, or why not?