Java String Pool: Concept & Advantages
I hope you already heard about string constant pool in Java? If no, I’ll explain what is it. The main advantage of the string pool in Java is to reduce memory usage. When you create a string literal: Java checks for the same value in the string pool. If it’s present, Java takes a reference … Read more