public class TestSegment { public static void main(String[] args) { Segment s = new Segment(0, 10, 10, 0); Segment s2 = new Segment(0, 10, 10, 0); System.out.println(s.equals(s2)); } }