title: What is the proper way to use a .equals method in Java?
body: <p>I was talking with my CompSci professor and he suggested that all String <code>.equals</code> methods be written as:</p>
  
  <pre><code>"Hello World".equals(fooString);
  </code></pre>
  
  <p>rather than:</p>
  
  <pre><code>fooString.equals("Hello World");
  </code></pre>
  
  <p>Both of these lines compile, but I was wondering what are the benefits of the first way?  I've always done it the latter way.  Is this wrong? What is common/conventional?</p>