title: Recursion gives unexpected/wrong output?
body: <p>So I was doing a recursion challenge on <a href="http://codingbat.com/java" rel="nofollow noreferrer">codingbat</a> and came across the "bunny ears" problem where we have a number of bunnies and each bunny has two big floppy ears. We want to compute the total number of ears across all the bunnies recursively (without loops or multiplication).  </p>
  
  <p>The solution apparently is quite simple: </p>
  
  <pre><code>public int bunnyEars(int bunnies)
  {
      if(bunnies == 0)
          return 0;
      return 2+bunnyEars(bunnies-1);
  }
  </code></pre>
  
  <p>But I am not able to understand. If we pass 2 in the bunnyEars(2) method the 
  recursive part bunnyEars(bunnies-1); should have 1 left in the bracket after subtraction and thus 2+(1); which should be equal to 3 and not 4.<br>
  But the output comes as 4. So how does recursion actually work in this code?</p>