When we declare a String literal like
String str = "abc";
only one object is created in String pool. But when we create it like
String str = new String("abc");
2 objects are created one in heap memory other in the String pool. whats the purpose of creating an entry in string pool when you already have an object placed in the heap memory?