Comparing two strings within if statement
<p>I have the following code:</p>

<pre><code>String tmp = "cif";
String control = tmp.substring(1);


if(control == "if") {

append = "if( ";

}
</code></pre>

<p>However, despite control being "if", the test will still fail. Any solutions?</p>
