Tag: string
-
String in Java
There are two ways to create a String object: Now, let us understand the concept of Java String pool. Java String Pool: Java String pool refers to collection of Strings which are stored in heap memory. In this, whenever a new object is created, String pool first checks whether the object is already present in…