title: Inheritance vs. Delegation
body: <p>The code below shows how method m() can be reused by inheritance. How works for delegation? Thanks!</p>
  
  <pre><code>  class A{
    int m();
    }
  
   class B extends A{}
  
   B b =new B()
   b.m();
  </code></pre>