표준입력 (stdin)
실행옵션 (runtime option)
코드:
실행 »
표준입력/실행옵션
import java.util.*; public class prog { public static void main(String[] args) { int[] arr1 = {1, 2, 3, 4, 5}; int[] arr2 = Arrays.copyOf(arr1, 3); for (int i = 0; i < arr2.length; i++) { System.out.print(arr2[i] + " "); } System.out.println(); int[] arr3 = Arrays.copyOf(arr1, 10); for (int i = 0; i < arr3.length; i++) { System.out.print(arr3[i] + " "); } } }