title: Extending class for activity
body: <p>I'm totally new to Android (Java) Development and I'm so excited about it! The developers guide of Google is fantastic and I learned a lot in a small time. It even keeps me awake during the night ;)</p>
  
  <p>Today I went through making menu's and there's something that I can't understand. It's about extending classes. The guide says:</p>
  
  <blockquote>
    <p>Tip: If your application contains multiple activities and some of them
    provide the same Options Menu, consider creating an activity that
    implements nothing except the onCreateOptionsMenu() and
    onOptionsItemSelected() methods. Then extend this class for each
    activity that should share the same Options Menu. This way, you have
    to manage only one set of code for handling menu actions and each
    descendant class inherits the menu behaviors.</p>
  </blockquote>
  
  <p>The point I don't get is how to extend a class... Let say I have a <strong>MainActivity</strong> and a <strong>SubActivity</strong>. I want to have the same menu in both activities so I make a <strong>MainMenuActivity</strong>. How do I extend this class for both activity's? </p>
  
  <p>Yes I do searched on the net but couldn't find any usable. I really want to understand it so I hope anyone can help me out with some samplecode + explanation. Thank you in advance!!</p>