Advertisement
PRO_gramer

Untitled

Apr 26th, 2017
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. package aula.est;
  2.  
  3.     public class Aluno {
  4.         private String nome;
  5.         public String getNome() {
  6.             return nome;
  7.         }
  8.         public void setNome(String nome) {
  9.           this.nome = nome;
  10.         }
  11.         public String toString() {
  12.             return this.nome;
  13.         }
  14.         public boolean equals(Object o) {
  15.             Aluno outro = (Aluno)o;
  16.             return this.nome.equals(outro.nome);
  17.         }
  18.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement