题目描述
请在下面的程序中插入一段代码,这段代码的功能是:将a、b数组中不同的数字保存到一个新的数组c中。
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
int[] a = { 15, 20, 30, 40, 55, 60, 75, 80 }, b = { 15, 20, 40, 80,-5 };
int[] c;
//插入你的代码
Arrays.sort(c); //将新数组排序后输出其中的内容
System.out.println(Arrays.toString(c));
}
}
输出样例
[-5, 30, 55, 60, 75]
用户代码