public class Duration {
private final int min;
private final int sec;
public Duration(int min, int sec) {
this.min = min;
this.sec = sec;
}
public boolean equals(Object d) {
return true;
}
public static void main(String[] args) {
Duration d1 = new Duration(10,5);
Duration d2 = new Duration(10,5);
Object o1 = d1;
Object o2 = d2;
System.out.println(d1.equals(d2)); System.out.println(o1.equals(o2)); System.out.println(d1.equals(o2)); System.out.println(o1.equals(d2)); System.out.println(d1.equals(o1)); }
}