Skip to content

Instantly share code, notes, and snippets.

@gregori
Created June 4, 2020 01:09
Show Gist options
  • Save gregori/04eeefa03e06e44bedd1b478ed669cbd to your computer and use it in GitHub Desktop.
Save gregori/04eeefa03e06e44bedd1b478ed669cbd to your computer and use it in GitHub Desktop.
package exemplo;
public class Pessoa {
private int id;
private String nome;
private int idade;
public Pessoa() { }
public Pessoa(int id, String nome, int idade) {
this.id = id;
this.nome = nome;
this.idade = idade;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public int getIdade() {
return idade;
}
public void setIdade(int idade) {
this.idade = idade;
}
@Override
public String toString() {
return "Pessoa [id=" + id + ", nome=" + nome + ", idade=" + idade + "]";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment