About the keyword, "new" in Java
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/1881922/questions-about-javas-string-pool">Questions about Java&#39;s String pool</a>  </p>
</blockquote>



<p>Guys what is the difference between these two. <br></p>

<p>(1)</p>

<pre><code>String s = new String("hello"); // creating an object on heap then assign that object to the reference s.
</code></pre>

<p>(2)</p>

<pre><code>String s = "hello" // did I make an object here?? Im not using the word new.
</code></pre>

<p>Also array example
<br></p>

<pre><code>int x[] = {1, 2, 3, 4, 5}; // did I make object here? 
</code></pre>
