title: Java enum can I add a return method?
body: <p>Is it possible to use Enum in Android like this? </p>
  
  <pre><code>public enum EventAction 
  {
    SDCARD_MOUNTED
    {
      public String toString() {
        return "External SDCard was mounted";
      }
  
      public int getCode() {
        return 25;
      }
    }
  }  
  </code></pre>
  
  <p>From the outside code I have an access only to EventAction.SDCARD_MOUNTED.toString() but .getCode() is not visible. Examples I saw show how getCode() is used from inside code.</p>