* Deep copy of Arraylist

* Deep copy of Arraylist

* Deep copy of Arraylist updated as per review

* Deep copy of Arraylist updated as per review

* Deep copy of Arraylist updated as per review
This commit is contained in:
Shahul Basha 2023-07-05 08:24:57 -04:00 committed by GitHub
parent e3f36b304f
commit 1556a3c384
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ public class Course implements Serializable, Cloneable {
try {
return (Course) super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError();
throw new IllegalStateException(e);
}
}
}

View File

@ -95,7 +95,7 @@ public class Student implements Serializable, Cloneable {
try {
student = (Student) super.clone();
} catch (CloneNotSupportedException e) {
throw new AssertionError();
throw new IllegalStateException(e);
}
student.course = this.course.clone();
return student;