title: When to use Enum / Int Constants
body: <p>I have a question that when should we use Enum and when should we use a final constants?</p>
  
  <p>I know that it has been discussed at <a href="https://stackoverflow.com/questions/613837/enums-and-constants-which-to-use-when">Enums and Constants. Which to use when?</a> though it is C# question.</p>
  
  <p>My question is why Android use so many Constants rather than Enum? For example ,
  <a href="http://developer.android.com/reference/android/content/Context.html#MODE_ENABLE_WRITE_AHEAD_LOGGING" rel="nofollow noreferrer">Context</a></p>
  
  <p>In my opinion, if we use constants, there may be the risk that as below:
  if we define a LEVEL Constant that</p>
  
  <pre><code> public static final int LEVEL_LOW=1;
   public static final int LEVEL_MEDIUM=2;
   public static final int LEVEL_HIGH=3;
  </code></pre>
  
  <p>when we pass a param of int =4. it will not have compile error, and if we pass a number of 1, the code reader may not easily know what it means. </p>
  
  <p>But Enum can solve this problem though it may cause more overhead since it is Object. </p>
  
  <p>So why Android uses constants instead of Enum?
  Is there any principle that when should we use constants or Enum in such case?</p>