title: Why the String reference variable does not return the reference hashcode when printed
body: <p>I am executing below simple main method in Java.</p>
  <pre><code>public class Basics {
  
      public static void main(String[] args) {
          
          String p=new String();
          System.out.println(p);
          int[] a= new int[1];
          System.out.println(a);
      }
  }
  </code></pre>
  <p>The output of the Array reference variable is <code>classname@hashcodeinhexadecimal</code> which seems to be ok but the String reference variable gives no output. Isn't that it should return the hashcode of the new String object created in the heap?</p>