String is immutable

Overview We will find answers for the following questions What is String pool? How does memory allocation work for String? Why is String immutable. String pool String pool is a special storage area in Java heap. When a string is created and if the string already exists in the pool, Read more…