title: How to make key value like enum in java
body: <p>I need to make an <code>Enum</code> containing some strings with spaces and their values in <code>int</code> like:</p>
  
  <pre><code>public enum status{
  Active(1),
  Inactive(2);
  }
  </code></pre>
  
  <p>because I am using it with hibernate and also will convert it to JSON for alpaca js forms.</p>
  
  <p>like:</p>
  
  <pre><code>[{"text": "Inactive", "value":"2"},{"text": "Active", "value":"1"}]
  </code></pre>
  
  <p>I'm stuck in making <code>enum</code>.  how to make such type of <code>enum</code>?</p>