Notes
Metodos get e set
Content of the notes (2)
Page 1
metodo get =
pegar informação
metodo set=
envia a informação
sintaxe
public class Cachorro {
private String nome;
private String raca;
private int idade;
public void latir(){
System.out.println("Auau");
}
public void andar(){
System.out.println("andando...");
}
String getRaca(String raca){
this.raca=raca;
}
void setRaca(String raca){
this.raca=raca;
}
}
Page 2
Information
- Description
- Técnico Desenvolvedor Mobile Note on Metodos get e set, created by joao vito on 27/04/2018.
- Created by
- joao vito · Apr 2018
- Updated
- Apr 27, 2018
- Views
- 2
- Rating