if else condition in java, android : <p>i have a TextView which is set using...</p>

<pre><code>// Declare view variables
private TextView mInfoText;

// Assign views from layout file to cor. vars
mInfoText = (TextView) findViewById(R.id.infoText);
</code></pre>

<p>how do i do an if else statement for the text inside it, i thought about doing it like this, but it doesn't work, i get a red line under the word "Sand".</p>

<pre><code>if (mInfoText = "Sand"){

                //Show correct

            } else {

                //Show incorrect
            }
</code></pre>

<p>Any ideas?</p>
