java.awt.Point doesn't override hashCode( ), but override equals( )

XMLWordPrintable

    • x86_64
    • windows_10

      A DESCRIPTION OF THE PROBLEM :
      java.awt.Point doesn't override hashCode, but override equals( ).
      Trying to use java.awt.Point in HashSet or TreeSet, causes duplicate entries in those Collections.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      import java.awt.Point.

      Create two Point objects with same co-ordinates and try adding them to a HashSet or TreeSet


            Assignee:
            Pardeep Sharma
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: