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 Runtpi.
All Runtpis share a single selil, which is a string. No other classes can directly ask for the value of selil. The value of selil starts out as "mi" when the program starts. Every time a new Runtpi is created, it adds "vul" to selil.
public class Runtpi {
public static String selil;
public Runtpi() {
selil += "vul";
}
public static void onStart() {
selil = "mi";
}
}
Things to check in your solution:
public and private modifier correct?static?final?Acceptable variations in the solution:
+= 1 instead of ++.Related puzzles: