course[] cr4 = { new course("5", "离散数学"), new course("6", "java语言") };
beixuankecheng.addAll(Arrays.asList(cr4));
course kc3=(course) beixuankecheng.get(2);
course kc4=(course) beixuankecheng.get(3);
System.out.println("添加了两毛课程"+kc3.id+kc3.name+kc4.id+kc4.name);
course []cr5={ new course("6", "高等数学"), new course("7", "c#语言") };
course kc5=(course) beixuankecheng.get(2);
course kc6=(course) beixuankecheng.get(3);
System.out.println("添加了门毛课程"+kc5.id+kc5.name+kc6.id+kc6.name);
beixuankecheng.addAll(Arrays.asList(cr5));
希望对你有所帮助(● ̄(エ) ̄●)