Java has a built in function called arraycopy that can do this for you without a double for loop. Much more efficient.
www.google.com.tw