title: Java - Error : return type is incompatible
body: <p>I'm learning java. I was trying to run the code, where I got this error: <code>return type is incompatible</code>.
  Part of code where it showed me error.</p>
  
  <pre><code>class A {
      public void eat() { }
  }
  
  class B extends A {
      public boolean eat() { }
  }
  </code></pre>
  
  <p>Why it is happening?</p>