String Immutability in Java/ Immutable string in Java

Published: 19 September 2017
on channel: 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...  


On this page of the site you can watch the video online String Immutability in Java/ Immutable string in Java with a duration of hours minute second in good quality, which was uploaded by the user EasyConcepts 19 September 2017, share the link with friends and acquaintances, this video has already been watched 3,656 times on youtube and it was liked by 103 viewers. Enjoy your viewing!