title: Java substring with one char
body: <p>I have</p>
  
  <pre><code>String x = g.substring(0, 1);
  if (x == "S") {
      stuff
  }
  </code></pre>
  
  <p>I have a string, "Safety", but "stuff" doesn't run and my watch say x value = S and <code>x=="S"</code> = false.</p>