title: Can an implemented class have methods NOT declared in its parent interface?
body: <p>I tried this in Eclipse and it shows a compile error. However trying the same in the online IDE <a href="http://www.compilr.com" rel="nofollow">Compilr</a> showed no errors. That's why the confusion.</p>
  
  <pre><code>interface Iclass{
    void print();
    void hey();
  }
  
  class sdlfkajl implements Iclass {
    public void print(){
      System.out.println("Impl class");
    }
    public void  hey(){
      System.out.println("Hey!");
    }
    public void extra(){
      System.out.println("Should I be here?");
    }
  }
  </code></pre>
  
  <p>The error shown is that this class cannot have methods not declared in the interface. Suggestion tooltip said I should declare this method in the interface too.</p>