JAVA程序。。。定义两个数组,首先把两个数组合并成一个数组,然后把新数组中的元素逆序排列
JAVA程序。。。定义两个数组,首先把两个数组合并成一个数组,然后把新数组中的元素逆序排列
日期:2017-12-16 20:04:08 人气:1
public static void main(String[] args) { Integer[] a = { 45, 9, 8 }; Integer[] b = { 3, 6, 5, 9 }; Integer[] result = new Integer[a.length + b.length]; System.arraycopy(a, 0, result, 0, a.length); System.arraycopy(b, 0, result, a.length, b.length);