日期:2014-05-20 浏览次数:20633 次
import java.util.*; public class Test { public static void main(String[] args) { int[] a = new int[] {1, 2, 5, 7}; int[] b = new int[] {3, 4, 6, 8}; int[] c = new int[a.length + b.length]; System.arraycopy(a, 0, c, 0, a.length); System.arraycopy(b, 0, c, a.length, b.length); Arrays.sort(c); System.out.println(Arrays.toString(a)); System.out.println(Arrays.toString(b)); System.out.println(Arrays.toString(c)); } }
------解决方案--------------------