There are not enough conditions in the statement, e.g.:
1) Which types of array elements should be supported - primitives/wrappers or ref-types also?
2) Which type of copying should be implemented - shallow or deep?
For ease of implementation, we assume that array elements can only be primitives/wrappers, which means that shallow copying is enough.
Task 1. Write a program to copy an array.
There are not enough conditions in the statement, e.g.: 1) Which types of array elements should be supported - primitives/wrappers or ref-types also? 2) Which type of copying should be implemented - shallow or deep?
For ease of implementation, we assume that array elements can only be primitives/wrappers, which means that shallow copying is enough.