string memory allocation
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3361079/string-memory-allocation">string memory allocation</a>  </p>
</blockquote>



<p>What is the difference between</p>

<pre><code>System.out.println("hello world");
System.out.println("hello world");
</code></pre>

<p>and </p>

<pre><code>String s="hello world";
System.out.println(s);
System.out.println(s);
</code></pre>

<p>and which one is better?</p>
