Inspectopedia Help

Single character string concatenation

Reports concatenation with string literals that consist of one character.

These literals may be replaced with equivalent character literals, gaining some performance enhancement.


String hello = hell + "o";

After the quick-fix is applied:

String hello = hell + 'o';

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Java, 233.SNAPSHOT

Last modified: 13 July 2023