Why Strings are immutable in JAVA? | Core JAVA| most asked Interview Questions| Freshers Experienced

  Рет қаралды 7,010

Developer Advocates Aspirant

Developer Advocates Aspirant

Жыл бұрын

The String is immutable in Java because of the security, synchronization and concurrency, caching, and class loading. The reason of making string final is to destroy the immutability and to not allow others to extend it. The String objects are cached in the String pool, and it makes the String immutable

Пікірлер: 2
@Shomnath_Das
@Shomnath_Das 7 ай бұрын
String is immutable this feature is applicable for not consuming unnecessary space or memory in JVM by creating same string again and again
@kannansm2003
@kannansm2003 8 ай бұрын
class HelloWorld { public static void main(String[] args) { String str="Hello World"; str=str.replaceAll(" ",""); System.out.println(str); } } Explain this bro
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Savage Vlogs
Рет қаралды 13 МЛН
Son ❤️ #shorts by Leisi Show
00:41
Leisi Show
Рет қаралды 9 МЛН
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 12 МЛН
CHOCKY MILK.. 🤣 #shorts
00:20
Savage Vlogs
Рет қаралды 19 МЛН
Why string is immutable in java || The 4 reasons you must know || part 1
20:53
What is String Immutable || Why String Object Is Immutable In Java (Hindi)
17:36
Java Strings are Immutable - Here's What That Actually Means
7:06
Coding with John
Рет қаралды 610 М.
String Immutable In Java Interview Question
9:47
Naveen AutomationLabs
Рет қаралды 20 М.
Java Interview Questions | Java Program Solving | Core & Advance Java | Part 1
39:46
The Kiran Academy - Java By Kiran
Рет қаралды 243 М.
SPILLED CHOCKY MILK PRANK ON BROTHER 😂 #shorts
00:12
Savage Vlogs
Рет қаралды 13 МЛН