Used the System.arraycopy() method rather than the loop.