title: What's the limit to the number of members you can have in a java enum?
body: <p>Assuming you have a hypothetical enum in java like this (purely for demonstration purposes, this isn't code i'm seriously expecting to use):</p>
  
  <pre><code>enum Example{
      FIRST,
      SECOND,
      THIRD,
      ...
      LAST;
  }
  </code></pre>
  
  <p>What's the maximum number of members you could have inside that enum before the compiler stops you?</p>
  
  <p>Secondly, is there any performance difference at runtime when your code is referencing an enum with say, 10 members as opposed to 100 or 1,000 (other than just the obvious memory overhead required to store the large class)? </p>