SHARE
TWEET

Untitled

a guest Mar 7th, 2013 37 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public boolean equals(int x, int y){
  2.         if(x == this.x && y == this.y){
  3.                 return true;
  4.         }
  5.         else{
  6.                 return false;
  7.         }
  8. }
  9.  
  10. public int hashCode() {
  11.         int hash = 1;
  12.    
  13.         hash = hash * 17 + this.x;
  14.         hash = hash * 31 + this.y;
  15.  
  16.         return hash;
  17. }
RAW Paste Data
Want to get better at Java?
Learn to code Java in 2017
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top