addAll
作品以外のユニークな値を検出するが、でも、あなたが代わりにHash Setを使用することができ、両方の配列リストで同様の値リスト・アレイは
List<Student> sourceList = new ArrayList<Student>(students);
List<Student> destinationList = new ArrayList<Student>(students1);
sourceList.removeAll(students1);
destinationList.removeAll(students);
sourceList.addAll(destinationList);
for (Student student : sourceList) {
System.out.println("SIM:::Student: [RollNo : " + student.getRollNo() + ", Name : " + student.getName() + " ]");
}
「学生」が「同等」を意味するように上書きするようにします。 – Mena
ok私は – VigneshWaran