which the best best technique of String equals comparing
<p>which if block is better?</p>

<pre><code>private static void checkStr(String str) {

    if (str.equals("exit")) {
        System.out.println("It is equal");
    }
    if ("exit".equals(str)) {
        System.out.println("It is equal");
    }
}
</code></pre>
