Back to Intellij Community

RedundantStringFormatCall

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

2025.3-rc-2264 B
Original Source

Reports calls to methods like format() and printf() that can be safely removed or simplified.

Example:

System.out.println(String.format("Total count: %d", 42));

After the quick-fix is applied:

System.out.printf("Total count: %d%n", 42);