arraycopy 메서드를 이용한 배열의 복사
System.arraycopy() 메서드를 이용해서 배열의 값을 복사할 수 있다. for문을 사용한 것보다 효율적이라는 장점이 있다. 사용법 System.arraycopy(from객체, 복사시작 index, to객체, to객체의 복사시작 index, 복사할 원소의 개수); package test; public class Test { public static void main(String[] args) { int[] fromArr = {10, 20, 30, 40, 50}; int[] toArr = new int[fromArr.length]; System.arraycopy(fromArr, 0, toArr, 0, fromArr.length); int i = 0; for(int a : toArr) { Syste..