title: nested "if"s or more "return" statements?
body: <p>I would like to know which is better in a function (in my case a java method, but I assume it is applicable in more langauges): including nested ifs with few return statements, or no nested ifs with many return statements?</p>
  
  <p>For the sake of brevity, I'll use a simple example; However, I am asking about a general and longer case for both options.</p>
  
  <pre><code>if(condition1) {
        if(condition2) {
           return condition3;
        }
  }
  return false;
  </code></pre>
  
  <p>or this:</p>
  
  <pre><code>if(!condition1) 
    return false;
  if(!condition2)
     return false;
  return condition3;
  </code></pre>