正在加载图片...
java uti套件 在 Java se6中, Arrays类别新增了 copyof0 方法 int[]arr1={1,2,3,4,5} int[] arr2 Arrays copyof(arrl, arrl. length)i for(int 1=0; i< arr2length i++) System. out.print(arr2[i] + " System. out. println()i int[]arr1={1,2,3,4,5}; int[] arr2 =Arrays. copyof(arrl, 10 for(int i=0, i< arr2 length; i++ System. out. print(arr2[i] + "" System. out. println()ijava.util套件 • 在Java SE 6中,Arrays类别新增了copyOf() 方法 int[] arr1 = {1, 2, 3, 4, 5}; int[] arr2 = Arrays.copyOf(arr1, arr1.length); for(int i = 0; i < arr2.length; i++) System.out.print(arr2[i] + " "); System.out.println(); int[] arr1 = {1, 2, 3, 4, 5}; int[] arr2 = Arrays.copyOf(arr1, 10); for(int i = 0; i < arr2.length; i++) System.out.print(arr2[i] + " "); System.out.println();
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有