Best practice for menu inflater
<p>I have seen there are two ways to do this:</p>

<p>Creating a variable then using that variable to call the .inflate</p>

<pre><code>@Override
public boolean onCreateOptionsMenu(Menu menu) {
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.menu_add, menu);
    return true;
}
</code></pre>

<p>And just assigning directly to the method</p>

<pre><code>@Override
public boolean onCreateOptionsMenu(Menu menu) {
    getMenuInflater().inflate(R.menu.menu_add, menu);
    return true;
}
</code></pre>

<p>Is there a right and a wrong way to do this or are they essentially the same?</p>

<p>Thanks</p>
