title: Alternative of Multiple inheritance in Java
body: <p>I have created two beans </p>
  
  <pre><code>class BackPageBean{
     String backPage = null;
    :
    :
    :
  }
  
  
  class InformationMessageBean{
     String informationMessage = null;
    :
    :
    :
  }
  </code></pre>
  
  <p>Now, if a class is backpage aware then it will extend backPageBean, or if it need to show some kind of message then it extends InformationMessageBean.</p>
  
  <pre><code>class BackPageAware extends backPageBean{
  }
  
  class InfoMessAware extends InformationMessageBean{
  }
  
  
  
      someFunction () {
         if ( theObject instanceOf backPageBean ) {
                prepareTheBackPage ( theObject.getBackPage() );
         }
  
         if ( theObject instanceOf InformationMessageBean ) {
                showtheInformation ( theObject.getMessage() );
         }
  
     }
  </code></pre>
  
  <hr>
  
  <p>Now the problem is, if i want to have a bean which is both BackPageAware as well as InformationAware then, as we don't have multiple inheritance, what should be the approach?</p>