title: What does Java compile an enumeration down to?
body: <p>A coworker and I had a discussion about how Java represents enumerations. I was under the impression they were strictly ints like C/C++. Or, if you add behavior (Type-Safe enum), it gets wrapped in a class. He believed that if it's small enough Java would compact it to a byte.</p>
  
  <p>However, I found this on the Oracle site:</p>
  
  <blockquote>Java programming language enums are far more powerful than their counterparts in other languages, which are little more than glorified integers. The new enum declaration defines a full-fledged class (dubbed an enum type).</blockquote>
  
  <p>I take it they are actual objects then. If so, is there a way to optimize them to save space?</p>
  
  <p>Thanks</p>
  
  <p>Edit: As mentioned in a comment on Jon's answer, I am after the serialization size of an Enum.</p>