operator && cannot be applied to boolean,char
<p>So I am working on a ModelViewController tic-tac-toe game homework and I am trying to check that if the board is empty at position xpos, ypos or not, but I got an error that says</p>

<blockquote>
  <p>operator &amp;&amp; cannot be applied to boolean,char</p>
</blockquote>

<p>Why does this occur and how can I change it to make it work?</p>

<pre><code>double xpos,ypos,xr,yr;
char[][] position = {{' ',' ',' '},
             {' ',' ',' '},
             {' ',' ',' '}};

public boolean isEmpty(int xpos, int ypos){
    int pos=xpos+3*ypos;
    boolean isPosWithinRange = pos&gt;=0 &amp;&amp; pos&lt;9 ;
    return isPosWithinRange &amp;&amp; position[xpos][ypos]=' ';
}
</code></pre>
