Java Tutorials: Why String is Immutable in Java

preview_player
Показать описание
Immutability: Should not change Object values once created
What benefits we get due to immutability:
Saving Heap Space
Good for HashMap Key
Good for critical operation
Good for Multiple thread operation. Thread safe

DO watch video for more info.

This problem is similar to following:
Why String is immutable in Java,
java Why String is immutable,
What you mean by String immutable in java,
java how immutability works on String,
java String immutable,
What is string immutability,
String immutable
java tutorial,
coding simplified,
java

CHECK OUT CODING SIMPLIFIED

I started my YouTube channel, Coding Simplified, during Dec of 2015.
Since then, I've published over 300+ videos. My account is Partner Verified.

★☆★ VIEW THE BLOG POST: ★☆★

★☆★ SUBSCRIBE TO ME ON YOUTUBE: ★☆★

★☆★ SEND EMAIL At: ★☆★
Рекомендации по теме
Комментарии
Автор

You are doing great service to Java society

ishathakur
Автор

Super explanation bro ....i got clarity

yashok
Автор

Nice article, Concept cleared why String is immutable.

dyudy
Автор

Can you jst explain me about appending in a string does it creates a different object for the new string and refers to that or there is something else... as strings are immutable eg:
string s1=""Code";
s1=s1+"Learn";
SOP(s1);

output will be: CodeLearn

pragatisrivastava