Why String is made immutable in Java? Well this is one of the most popular interview questions in Java. Isn't it?
The interviewer might starts with, What is String? How a Java String is different than String in C and C++? And then shift the focus on String Immutablity.
The interviewer might starts with, What is String? How a Java String is different than String in C and C++? And then shift the focus on String Immutablity.