@@ -0,0 +1,427 @@
+// Use length variable to help copy an array.%0Aclass ACopy %7B%0A%09public static void main(String args%5B%5D) %7B%0A%09%09int i;%0A%09%09int nums1%5B%5D = new int%5B10%5D;%0A%09%09int nums2%5B%5D = new int%5B10%5D;%0A%09%09%0A%09%09for(i=0; i %3C nums1.length; i++)%0A%09%09%09nums1%5Bi%5D = i;%0A%09%09%0A%09%09// copy nums1 to nums2%0A%09%09if(nums2.length == nums1.length)%0A%09%09%09for(i = 0; i %3C nums2.length; i++)%0A%09%09%09%09nums2%5Bi%5D = nums1%5Bi%5D;%0A%09%09%0A%09%09for(i=0; i %3C nums2.length; i++)%0A%09%09%09System.out.print(nums2%5Bi%5D + %22 %22);%0A%09%7D%0A%7D%0A

Use length variable to help copy an array