title: Java recursion build error: array required, but string found?
body: <p>I really need help fixing this line of my code, I keep getting these two errors:</p>
  
  <p>First Error: array required, but String found 
  if(x.length() == 0 &amp;&amp; y.length() > 0 &amp;&amp; y[0] == "*")</p>
  
  <p>Second Error: no suitable method found for replace(int,int) String newY = y.replace(0,1);
  any help would be appreciated</p>
  
  <pre><code>//Second string is empty and there is wildCard character
  if(y.length() == 0 &amp;&amp; wildCard)
  {
      return true;
  }
  if(x.length() == 0 &amp;&amp; y.length() &gt; 0 &amp;&amp; y[0] == "*")
  {
      String newY = y.replace(0,1);
      return match(x, newY, true);
  }
  </code></pre>