title: java enum confusion
body: <p>I came across the following java code. Here interface contains two methods out of which only one method is implemented in the enum. It is written that <code>name()</code> is implemented automatically. My question is how is it possible? I have not read any rule regarding automatic method implementation in enum before. So what is happening here? Furthermore the code is not giving any type of compile time error.</p>
  
  <pre><code>interface Named {
      public String name();
      public int order();
  }
  
  enum Planets implements Named {
      Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus, Neptune;
      // name() is implemented automagically.
      public int order() { return ordinal()+1; }
  }
  </code></pre>