title: using an array in a toString method
body: <p>I have been working on this project for a while now and I still can't figure out the first part of it. I am trying to make a grid of letters to make a word search, but I can't seem to figure out how to print it. So far I have:</p>
  
  <pre><code>public wordsearch(int row, int col, String letters){
      if (letters.length()== row*col){
          gridletters= letters;
          gridrow=row;
          gridcol=col;
          letters= letters.toUpperCase();
  
          String array[][]= new String[row][col];
  
          int character=0;
          for(int rowNum =0; rowNum&lt;row; rowNum++){
              for(int colNum=0; colNum&lt;col; colNum++){
                  array[rowNum][colNum] = letters.charAt(character) + "";
                  character++;
              }
          }
      }
  }
  </code></pre>
  
  <p>and then I have to print it using a toString method, but I can't access the array in the toString.</p>
  
  <pre><code>enpublic String toString(){
      String grid= "";
      for(int index=0; index&lt;gridrow; index++){
          for(int index2=0; index2&lt;gridcol; index2++){
              grid+= array[index][index2]+ " ";
          }
          grid+= "\n";
      }
      return grid;
  }
  </code></pre>
  
  <p>someone help please?</p>