Hello! Sorry for the noob question, but is it possible to use the condition in the setter? In the problem being solved, the resulting value must meet a certain condition, otherwise the default value must be substituted. I want to do this, but not sure if this is correct:
public void setHouseName(String houseName) { if (houseName.length()<4 || houseName.length()>20){ this.houseName = "House#" + collectorNumber; } else{ this.houseName = houseName; } }