String Immutability in Java/ Immutable string in Java

Publié le: 19 septembre 2017
sur la chaîne: EasyConcepts
3,656
103

This tutorial explains the concept of String Immutability in Java and helps us to understand why string class is made immutable.
NOTE:
The concat method will create string on heap in both cases. This is because strings are added in literal pool at class loading time by JVM. While the concat statement in both cases will be resolved at runtime and therefore, concatenated string should be on heap. In the tutorial, I was focused on explaining string immutability and missed this important point.
For detail tutorial on string watch -
   • How is String interned in Java? | String I...  


Sur cette page du site, vous pouvez voir la vidéo en ligne String Immutability in Java/ Immutable string in Java durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur EasyConcepts 19 septembre 2017, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 3,656 fois et il a aimé 103 téléspectateurs. Bon visionnage!