What is String Interning in Java ?

String interning refers to the concept of using only one copy of a distinct String value that is Immutable.

It provides the advantage of making String processing efficient in Time as well as Space complexity. But it introduces extra time in creation of String.



You May Interest

Why We Cannot Create a Generic Array in Java ?

How Can We Prevent a Deadlock in Java ?

What is the Reason to Organize Classes and Interfaces in a Packag ...

What are the Differences Between a HashSet and a HashMap in Java ...

How Can We Improve the Performance of IdentityHashMap in Java ?