给定以下枚举,将Int强制转换为Java中的枚举的正确方法是什么? public enum MyEnum { EnumValue1, EnumValue2 } MyEnum enumValue = (MyEnum) x; //Doesn't work???
確定! 回上一頁