title: memory allocation difference between assigning string to a variable and using directly with qoutes in java
body: <p>I want to know that what's the difference in memory allocation if i use</p>
  
  <pre><code>String s = new String("This is a string");
  System.out.println(s);
  editText.setText(s);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>System.out.println("This is a string");
  editText.setText("This is a string");
  </code></pre>
  
  <p>Is there any kind of differnce in both the steps..??</p>