Created
January 3, 2019 23:12
-
-
Save angeliski/773603a77ff8426bd8bb4ff87a2255a8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Pessoa { | |
String nome; | |
String sobrenome; | |
String idade; | |
@Override | |
public boolean equals(Object obj) { | |
if (!(obj instanceof Pessoa)) | |
return false; | |
Pessoa other = (Pessoa) obj; | |
if (!this.nome.equals(other.nome) || !this.idade.equals(other.idade)) | |
return false; | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment