title: Set Value to Enum - Java
body: <p>I'm trying to set values to enum in my java application....but I can't do that.</p>
  
  <p>Am I doing it wrong???</p>
  
  <pre><code>public enum RPCPacketDataType {
      PT_UNKNOWN(2),
      PT_JSON(4),
      PT_BINARY(5)
  };
  </code></pre>
  
  <p>It's giving me this error : The constructor RPCPacket.RPCPacketDataType(int) is undefined.</p>