title: simple word search java 2d arrays
body: <p>Im a begginner and i was wondering if anyone could tell me what im doing wrong here with this word search ?
  im stuck on checking each row for a word specified in the formal argument, currently it doesnt do any checks of any sort its jst a basic boolean method which returns true if a word is found within a row of the array.assuming the word search array is rectangular</p>
  
  <pre><code>    public boolean checkRow( char[][] puzzle, String w)
  {
      int counter = 0;
      boolean match = true;
      for ( int row = 0; row &lt; puzzle.length; row++)
      {
          counter = 0;
  
  
          for ( int col = 0; col &lt; puzzle[row].length; col++)
          {
              if ( counter &lt;= w.length() )
              {
                  char word = puzzle[row][col];
  
  
                  if( w.charAt(counter) == word)
                  {
                      match = true;
                      counter++;
                  }
              }
  
  
              else if ((counter == w.length()) &amp;&amp; (match == true))
              {
                  return true;
              }
  
  
               else 
              {
  
                  match = false;
                  counter = 0;
              }
  
  
  
          }
      }
  
  
      return match;
  }
  </code></pre>