Skip to content

Instantly share code, notes, and snippets.

@angeliski
Created January 3, 2019 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angeliski/773603a77ff8426bd8bb4ff87a2255a8 to your computer and use it in GitHub Desktop.
Save angeliski/773603a77ff8426bd8bb4ff87a2255a8 to your computer and use it in GitHub Desktop.
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