Question d’entretien chez Entain India

how strings are stored inside memory ?

Réponse à la question d'entretien

Utilisateur anonyme

1 juin 2018

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.