Behavior of String literals is confusing
Every compile-time constant expression that is of type String will be put into the String pool. Essentially that means: if the compiler can (easily) “calculate” the value of the String without running the program, then it will be put into the pool (the rules are slightly more complicated than that and have a few corner … Read more