KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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; }
Tags (comma-separated)
Save Edits
Cancel