Back to Intellij Community

LengthOneStringsInConcatenation

java/java-impl/resources/inspectionDescriptions/LengthOneStringsInConcatenation.html

2025.3-rc-2298 B
Original Source

Reports concatenation with string literals that consist of one character.

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

Example:

String hello = hell + "o";

After the quick-fix is applied:

String hello = hell + 'o';