Not working String comparison in Java
<p>This code is not working:</p>

<pre><code>String name = "Bob";
String name1 = "Anne";
if name = name1;
System.out.println ("Hello");
</code></pre>

<p>I am a beginner in Java, please help we with this code. I am trying to compare two strings.</p>
