62,621
社区成员
发帖
与我相关
我的任务
分享public class EnumTest {
public static void main(String[] args) {
System.out.println(EnumType.BBB.getValue());
}
}
enum EnumType {
AAA(0x1),
BBB(0x2),
CCC(0x4),
DDD(0x8);
private int value;
private EnumType(int value) {
this.value = value;
}
public int getValue() {
return value;
}
}