1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
|
public class Datum {
int tag;
int monat;
int jahr;
public Datum(int tag, int monat, int jahr) {
this.tag = tag;
this.monat = monat;
this.jahr = jahr;
}
@Override
public Object clone() {
return new Datum(this.tag, this.monat, this.jahr);
}
@Override
public boolean equals(Object other) {
Datum o = (Datum) other;
return this.tag == o.tag && this.monat == o.monat
&& this.jahr == o.jahr;
}
} |