title: Why can't i compare command line arguments like other string arrays?
body: <p>There seems to be a difference between <code>main(String[] args)</code> and other string arrays that i can not figure out, my example.</p>
  
  <pre><code>public class TestArgs 
  {
  public static void main(String[] args) {
      String[] x = {"1","2","3"};
      System.out.print( x[2] == "3" );
      System.out.print( args[2] == "3" );
  }}
  </code></pre>
  
  <p>I run this program as:</p>
  
  <pre><code>java TestArgs 1 2 3
  </code></pre>
  
  <p>I would expect the output to be "truetrue" but instead I get "truefalse"</p>
  
  <p>Could someone please tell me what the difference is, or am I just doing something really stupid...</p>