remove clone method
This commit is contained in:
parent
ad44dfc8aa
commit
eb9cc66cb2
|
@ -5,7 +5,7 @@ package org.cutem.lab2;
|
|||
* 1. A constructor that can return a CalendarDate object through the given string.
|
||||
* 2. A method named getDayOfWeek() that can get the index of a day in a week.
|
||||
*/
|
||||
public class CalendarDate implements Cloneable {
|
||||
public class CalendarDate {
|
||||
private int year;
|
||||
private int month;
|
||||
private int day;
|
||||
|
@ -113,14 +113,4 @@ public class CalendarDate implements Cloneable {
|
|||
return year + month + day;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object clone() {
|
||||
try {
|
||||
return super.clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
// impossible to happen
|
||||
throw new InternalError(e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue