DEVFYI - Developer Resource - FYI

How to make an array copy from System?

Java Interview Questions and Answers (part 1)


(Continued from previous question...)

152. How to make an array copy from System?

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.

(Continued on next question...)

Other Interview Questions