3 ms·
From https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.18.1 https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.htm... To increase the
by danielmg 9y ago
From https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.18.1 https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.htm...
To increase the performance of repeated string concatenation, a Java compiler may use the StringBuffer class or a similar technique to reduce the number of intermediate String objects that are created by evaluation of an expression.
The + operator is syntactically left-associative, no matter whether it is determined by type analysis to represent string concatenation or numeric addition. In some cases care is required to get the desired result.