title: recursively check if array contains 0 (java)
body: <p>My method is supposed to return true if there is a at least one 0 in the array and false otherwise. However my code does not compile. why is it complaining that my method is not returning a boolean value? Can anyone help? thanks</p>
  
  <pre><code>  public boolean containsZero(int [] array, int i)
    {  
  
        if (i &lt; array.length)
        {
            if (array[i] == 0)
               return true;
            else
             return containsZero(array, (i+1));     
        }
  
    }
  </code></pre>