title: Java - return or if-else
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/36707/should-a-function-have-only-one-return-statement">Should a function have only one return statement?</a>  </p>
  </blockquote>
  
  
  
  <p>This is what I am talking about.</p>
  
  <pre><code>if (condition) {
      aVariable = 1;
      return;
  }
  doSomething();
  
  if (condition) {
      aVariable = 1;
  } else {
      doSomething();
  }
  </code></pre>
  
  <p>Is one of these preferred over the other (conventions, etc)?</p>