title: Comparison in Scala
body: <p>What is the difference between <code>val a=new String("Hello")</code> and <code>val a="Hello"</code></p>
  
  <p>Example:</p>
  
  <pre><code>val a="Hello"
  val b="Hello"
  a eq b
  res:Boolean=True
  </code></pre>
  
  <p>Similarly:</p>
  
  <pre><code>val a=new String("Hello")
  val b=new string("Hello")
  a eq b
  res:Bolean=False
  </code></pre>