Possible Duplicate:
How to effectively copy an array in java?
Is there a benefit to using Arrays.copyOf()
or System.arraycopy()
? Why should I use one or the other, and where?
Possible Duplicate:
How to effectively copy an array in java?
Is there a benefit to using Arrays.copyOf()
or System.arraycopy()
? Why should I use one or the other, and where?
You should take a look at these two links:
As vulcan suggested above, this explains it very nicely: What is more efficient: System.arraycopy vs Arrays.copyOf?