I have an enum
and it has a parameter (field) that is a String
.
Am I allowed to have a setter for this field?
public enum Blah {
Monday("a"), Tuesday("b");
}
private final String letter;
Blah(String letter){
this.letter = letter;
}
Am I allowed to do the following?
public String setLetter(String letter){
this.letter = letter;
}