본문 바로가기

카테고리 없음

arraycopy

반응형

System Class의 Method는 Static 이고 생성자도 없다.

arraycopy

System.arraycopy

void java.lang.System.arraycopy(Object src, int srcPos, Object dest, int destPos, int length)

Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array. A subsequence of array components are copied from the source array referenced by src to the destination array referenced by dest. The number of components copied is equal to the length argument. The components at positions srcPos through srcPos+length-1 in the source array are copied into positions destPos through destPos+length-1, respectively, of the destination array.

src - 원본 배열
srcPos - 원본 배열의 시작지점
dest - 결과를 담을 대상 배열
destPos - 대상 배열의 시작지점
length - 시작부터 얼만큼 담을 것인가.

반응형