Created
June 4, 2020 01:09
-
-
Save gregori/04eeefa03e06e44bedd1b478ed669cbd 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
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