Java添加两个数组 用于连接两个数组的Java程序 字符串的Java字符 Java添加两个数组 import java.util.Arrays; public class ArrayConcate { public static void main(String[] args) { int[] a1 = {8,9,5,7,8}; int[] a2 = {12,78,96}; int len_a = a1.length; int len_b = a2.length; int[] result = new int[len_a + len_b]; System.arraycopy(a1, 0, result, 0, len_a); System.arraycopy(a2, 0, result, len_a, len_b); System.out.println(Arrays.toString(result)); } } 用于连接两个数组的Java程序 字符串的Java字符