String str = new String("java");
Using string literal "java" in the constructor, an new string value is stored in string constant pool Using new operator a new string object is created in the heap with "java" as value
So here two objects are created, one is in string pool and another in heap.
Could you please help me to understand what is the usefulness of new in String?