What is better way to compare Strings? : <p>Which among the 2 is better way to compare String?</p>

<pre><code>String str="Hello";

//case 1:
if(str.equals("Hello")){

//case 2:
if("Hello".equals(str))
</code></pre>
