String.intern in Java 6, 7 and 8 - string pooling | Java Performance Tuning Guide
This article will describe how String.intern method was implemented in Java 6 and what changes were made in it in Java 7 and Java 8. ... /** * Testing String.intern. * * Run this class at least with -verbose:gc JVM parameter. */ public class InternTest { ...