package com.ctgu.java; public class TestArray3 { public static void main(String[] args) { int[] i = new int[] {12, 13, 14}; int[] j = new int[10]; for(int k = 0; k < i.length; k++){ j[k]=i[k]; } j[3] = 15; j[4] = 16; //int k =1; for(int k = 0; k < j.length; k++){ System.out.println(j[k]); } // TODO Auto-generated method stub } }
原文地址:http://9815936.blog.51cto.com/9805936/1600859