package www.zhoushuiping02.com; public class DiQiTi { public static void main(String[] args) { int a[] = {1,5,3,2}; int b[] = {5,2,7,4}; int c[] = new int[a.length+b.length]; for(int i=0;i<a.length;i++) { c[i] = a[i]; } int j=0; for(int i=a.length;i<c.length;i++) { while(j<b.length) { c[i] = b[j]; break; } j++; } System.out.println("新数组为:"); for(int i=0;i<c.length;i++) { System.out.print(c[i]+" "); } } }