为什么奖这两个course数据里的内容提取出来时get位置是一样的,却都能显示出来而不会被覆盖?
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);