Are all
String objects created in String pool are they never be able to created on heap/memory?
Example:
String s="Hello";//Gets created in string pool
String s=new String("Hello");// I think this gets created in heap.
Please correct me if I am wrong.