title: Implementing a method which is declared in an interface and parent class
body: <p>I have a little dilemma here,</p>
  
  <p>say I have a class</p>
  
  <pre><code>public class Child extends Parent implements Interface{
   public static void main(String[] args){
    Child child = new Child();
     child.methodOne(); } }
  </code></pre>
  
  <p>where</p>
  
  <pre><code>abstract class Parent {
  
  public void methodOne()  {
      System.out.print("cannot fly ");
  }}
  
  interface Interface {
  public abstract void methodOne() throws Exception;}
  </code></pre>
  
  <p>There are no compilation errors with this structure</p>
  
  <p>wherease if I did this</p>
  
  <pre><code>abstract class Parent {
  
  public void methodOne() throws Exception {
      System.out.print("cannot fly ");
  }}
  
  interface Interface {
  public abstract void methodOne(); }
  </code></pre>
  
  <p>Two compliation errors rise saying</p>
  
  <pre><code>Exception Exception in throws clause of Parent.methodOne() is not compatible with Interface.methodOne()
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Unhandled exception type Exception
  </code></pre>
  
  <p>which asks to add <code>throws</code> or <code>try/catch</code> in <code>main</code> method</p>
  
  <p>Why is that happening?</p>