使用System.arraycopy(src, srcPos, dest, destPos, length)
参数:
src:the source array(要拷贝的源数组)
srcPos:starting position in the source array.(拷贝数据的起始索引,包括此索引拷贝)
dest:the destination array.(目标数组)
destPos:starting position in the destination data.(目标数组的起始位置)
length:the number of array elements to be copied.(拷贝长度)
异常:
IndexOutOfBoundsException:if copying would cause access of data outside array bounds
ArrayStoreException:if an element in the src array could not be stored into the dest array because of a type mismatch.
NullPointerException:if either src or dest is null.