 <p>Try this...</p> <pre><code>String s3 = s1 + s2 if(s3.equals("onetwo")) { ... </code></pre> <p><code>==</code> compares if they refer to the same object, and the result of <code>s1+s2</code> isn't in this case, and the <code>.equals()</code> method on string compares that the values are the same. In general, you only use <code>==</code> for primitive value comparisons. Although you can do it for objects iff you intend to check to make sure that two references point to the same object.</p>