thecoderenroute

Untitled

May 5th, 2020
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. public boolean equals(Person person) {
  2.         if(!(this.name.equals(person.name))){
  3.             return false;
  4.         }
  5.         if(this.height != person.height){
  6.             return false;
  7.         }
  8.         if(this.weight!= person.weight){
  9.             return false;
  10.         }
  11.         if(!this.birthday.equals(person.birthday)){
  12.             return false;
  13.         }
  14.         return true;
  15.     }
  16. }
Add Comment
Please, Sign In to add comment