Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean equals(int x, int y){
- if(x == this.x && y == this.y){
- return true;
- }
- else{
- return false;
- }
- }
- public int hashCode() {
- int hash = 1;
- hash = hash * 17 + this.x;
- hash = hash * 31 + this.y;
- return hash;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement