Translate the specification below into an idiomatic Java class definition.
(In this context, "idiomatic" means following the common style and conventions of the language.)
One kind of thing that exists in our model is a Chod.
Each Chod has its own esEl, which is a list of strings. The value of esEl starts out as an empty mutable list. Anyone can ask a Chod for the value of its esEl. Anyone can set esEl to a new value.
public class Chod {
private final List<String> esEl;
public Chod() {
}
public List<String> getEsEl() {
return esEl;
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: