Inspectopedia Help

Redundant call to 'String.format()'

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


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

After the quick-fix is applied:

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

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3


Java, 233.SNAPSHOT

Last modified: 13 July 2023