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

By default bundled with:

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin:

Java, 241.16690

Last modified: 29 April 2024