When I declare a String using:
String a = new String("Hello");
2 objects are created. 1 object resides in heap and another in String literal pool.
So when I do:
String b = "Hello";
Is a new object created or is "Hello" from String pool referenced to b?
 
     
     
     
    