Java / Strings
Where are the string created with the toString() method in memory?
It is based on jvm implementation per object. Usually toString method creates object in heap.
Integer.toString() method creates in heap but not for all toString() methods. Boolean.toString(), for example, returns strings from the string pool.
More Related questions...
instanceofCloneable is checked? What is the default implementation of equals method in Object class.