title: What is the null literal?
body: <p>I have written the following program.</p>
  
  <pre><code>public class StringTest {
      public static void main(String[] args){
          String x = "\0";
          String y = " ";
          System.out.println("This is x - "+x+".");
          System.out.println("This is y - "+y+".");
          System.out.println(x.equals(y));
      }
  }
  </code></pre>
  
  <p>Of course, <code>x.equals(y)</code> should clearly be <code>false</code>, as they are completely different <code>String</code>s. However, the output surprised me.</p>
  
  <pre><code>This is x -  .
  This is y -  .
  false
  </code></pre>
  
  <p>If these two <code>String</code>s are NOT equal, then how could they produce the same output?</p>