title: Get interface constant name using its value
body: <p>This might not have a major usecase in projects, but I was just trying a POC kind of project where in I get the key code, and using its value I want to print the key name on screen.
  I want to relive myself off writing switch cases, so thinking of going by reflection.</p>
  
  <p>Is there a way to get the constant integer of interface's name using its value?</p>
  
  <pre><code>KeyPressed(int i) {
      string pressedKeyName = getPressedKey(i);
      System.out.println(pressedKeyName);
  }
  </code></pre>