title: Performance/flexibility as in instance a class or extend it
body: <p>I am using 2 libraries and I need a class from one of the libraries to have functionality from the other. My first try was to take the source of library A and make the class extend the class from library B. This works kinda fine except alot of fixing etc which don't make the code all that stable etc and updating one of the libraries became a hell.</p>
  
  <p>like this:</p>
  
  <pre><code>abstract class classA extends classB{
  }
  </code></pre>
  
  <p>Now I also thought about doing something like this:</p>
  
  <pre><code>abstract class newClass extends classB{
      private classA A = new classA();
  
      public void exampleMethod(){
          A.exampleMethod();
      }
  }
  </code></pre>
  
  <p>Is the second option bad performance-wise? and if it is, how bad?</p>