我尝试在其中定义带有 int 的枚举,但在 eclipse 中出现错误:“令牌“int”上的语法错误,删除此令牌”我的代码:
package util.enumurations;
public enum BooleanEnum
{
private int value;
static
{
BooleanEnum[] arrayOfBooleanEnum = new BooleanEnum[2];
arrayOfBooleanEnum[0] = False;
arrayOfBooleanEnum[1] = True;
}
private BooleanEnum(int arg3)
{
int j;
this.value = j;
}
public int getValue()
{
return this.value;
}
}