Java - Is the Point class's hashCode() method any good, or should I override it and write my own?
问题 Is there any way to actually see the source code of standard java classes by the way? I'm making a hash table of points ( HashSet<Point> ) and I want to make sure that it will hash well, but I can't see what Point's hashCode() method actually looks like, so I don't know how good it really is. Can anyone help me? Should I override it? And if so, is there an easy way to do this without creating a whole new java file/class? 回答1: If you're searching for the hashCode() of java.awt.Point , it is