TP06 - TP07 début
This commit is contained in:
Binary file not shown.
@@ -37,6 +37,6 @@ public class Segment {
|
||||
}
|
||||
|
||||
public boolean equals(Segment s2) {
|
||||
return this.start == s2.start && this.end == s2.end;
|
||||
return (this.start.equals(s2.start) && this.end.equals(s2.end));
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,6 @@ public class TestSegment {
|
||||
Segment s = new Segment(0, 10, 10, 0);
|
||||
Segment s2 = new Segment(0, 10, 10, 0);
|
||||
|
||||
System.out.println(s.equals(s2));
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user