I've heard (can't find the source) that starting on Java 5 statements such as
String a = "a" + "B" + "c";
were actually optimized by the compiler into String a = "aBc";
But I can't find it online.
Can you help a sister out?
Could you please reconsider marking my question as a duplicate? The question marked as dup actually is the behavior of the compiler, NOT the reference to the docs, which is my question about.
Also, my question asks when this behavior started, which is not addressed by the question marked as dup.