I have a Bean class ( Casa.java
)
public class Casa{
//atribubutos
private String parede;
public Casa(){
}
//getters e setters
public void setParede(String parede){
this.parede = parede;
}
public String getParede(){
return parede;
}
}
I'm trying to instantiate it in another class as in the example
public class testeCasa(){
public static void main(String[] args){
String erro="";
try{
Casa casa = new Casa();
casa.setParede("Parede Sul");
System.out.println(casa.getParede());
}
}catch (Exception e{
erro = e.getMessage();
}finally{
System.out.println(erro);
}
}
Only when I run debug , it arrives at the Casa casa = new Casa();
excerpt "and stops the program nor does it continue pro casa.getParede();
and goes straight to finally
by printing the error as" ". What can it be?