Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.ArrayList;
- /**
- *
- * @author xremix31
- */
- public class Pessoa {
- private String nome;
- private int numero;
- private long nif;
- private int[] lista;
- public Pessoa(String nome) {
- this.nome = nome;
- }
- public String getNome() {
- return nome;
- }
- public void setNome(String nome) {
- this.nome = nome;
- }
- public int getNumero() {
- return numero;
- }
- public void setNumero(int nome) {
- this.numero = numero;
- }
- public long getNif() {
- return nif;
- }
- public void setNif(long nif) {
- this.nif = nif;
- }
- public int[] getLista() {
- return lista;
- }
- public void setLista(int[] lista) {
- this.lista = lista;
- }
- public int consultarLista(String nome){
- lista = new int[3];
- for (int i = 0; i < lista.length; i++) {
- if(nome.equals(lista[i].getNome()))
- }
- @Override
- public String toString() {
- return "nome=" + nome + ", nif=" + nif + ", lista=" + lista ;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement