title: Java syntax explanation - getMenuInflater()
body: <p>Just downloaded android studio, and I am using big nerd ranch's guide to android programming to learn the ropes.</p>
  
  <p>When you start android studio this code is already in the main activity file:</p>
  
  <pre><code> @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      **getMenuInflater().inflate(R.menu.menu_quiz, menu);**
      return true;
  }
  </code></pre>
  
  <p>I don't understand the <code>getMenuInflater</code> line. In my short experience with java only an object comes before a method when using a period to separate the two such as in <code>dog.bark()</code>. Here it looks like the line means call the inflate method which is defined within the getMenuInflater method. However, I checked the source code for <code>getMenuInflater()</code>, and there is no inflate method in its body.</p>
  
  <p>Can somebody demystify the syntax in this line for me?</p>