how strings are stored inside memory ?
Utilisateur anonyme
This part of the heap memory is called String Constant Pool. Whenever you create a string object using string literal, that object is stored in the string constant pool and whenever you create a string object using new keyword, such object is stored in the heap memory.