I have the following enum:
public static enum OpCode { a((byte) 0x0), b((byte)0x18), c((byte)0x1A); private byte value; private OpCode (byte value) { this.value = value; } byte getValue() { return value; } if I have the value x = 0x18 how can I get the string 'b'?
this is what I tried:
System.out.println(OpCode.values()[x]); but it doesn't work