How to make an array copy from System?

Q

How to make an array copy from System?

✍: Guest

A

There is a method called arraycopy in the System class. You can do it:
System.arraycopy(sourceArray, srcOffset, destinationArray, destOffset, numOfElements2Copy);
When you use this method, the destinationArray will be filled with the elements of sourceArray at the length specified.

2012-09-04, 2245👍, 0💬