Advantages of composition over inheritance in Java
<p>The below paragraph is quoted from the book, "Thinking in Java" by Bruce Eckel.</p>

<blockquote>
  <p>Composition comes with a great deal of flexibility. The member objects of your new class are typically private, making them inaccessible to the client programmers who are using the class. This allows you to change those members without disturbing existing client code. <strong>You can also change the member objects at run time, to dynamically change the behavior of your program. Inheritance, which is described next, does not have this flexibility since the compiler must place compile-time restrictions on classes created with inheritance</strong>.</p>
</blockquote>

<p>I don't understand, how the member object can be changed dynamically, and how it is an advantage over inheritance.
Could somebody please explain this</p>