Java String Constant Pool
Learn about String class in Java, the motivation behind making it immutable, and the idea of a String constant pool. We will see how memory is manipulated when we create String instances via String literals or String constructors. Finally, we will go through the main advantages and disadvantages caused by the immutability of the String …