private enum Val{ Val1, Val2, }
private enum Val{ val1("バリュー0"), val2("バリュー1"); private final String strVal; private Val(String str) { strVal = str; } public String getVal(){ return strVal; } }
[[interface]] ITest{ String getVal(); } private enum Val implements ITest{ val1("バリュー0"), val2("バリュー1"); private final String strVal; private Val(String str) { strVal = str; } @Override public String getVal(){ return strVal; } }