How can i specify where o board ends?
<p>i have a board([17][17]) and i place words in it giving the row and the column.I want if the position of the word given is bigger than the board,then a message is shown and you should give the row and column again.</p>

<pre><code> **Board class**
  ......
  public void placeWord(char[][] board, String word, int x, int y)

for (int i = 0; i &lt; word.length(); i++)
    {
     if (y + i &gt;= board[x].length)
         {
             System.out.println("The board is smaller!!");
              Board b=new Board();
              int a,r;
              System.out.println("Give row and column again");
              a=in.nextInt();
              r=in.nextInt();
              b.placeWord(board, word, a, r);
         }

     else {
         board[x][y + i] = word.charAt(i);
         }
    }
</code></pre>

<p>When i give a=3 and r=5 it still prints me "The board is smaller!!" and want to give new values again.Does anyone know how to fix this?</p>

<p><strong>Edit</strong></p>

<pre><code> **main()**
 board b=new board();
 String s="abc";
 int x=2,y=20;
 b.placeWord(Board, s, x, y);

 for(int i=0;i&lt;Board.length;i++)//prints the board
     {
          System.out.println(Board[i]);

         }
</code></pre>
