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 Pholpass.
All Pholpasss share a single sciar, which is a list of strings. No other classes can directly ask for the value of sciar. The value of sciar starts out as an empty mutable list when the program starts. Every time a new Pholpass is created, it adds "e" to sciar.
public class Pholpass {
public static List<String> sciar;
public Pholpass() {
sciar.add("e");
}
public static void onStart() {
sciar = new ArrayList<>();
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: