Inspectopedia Help

Variable type can be explicit

Reports local variables of the var type that can be replaced with an explicit type.

Example:

var str = "Hello";

After the quick-fix is applied:

String str = "Hello";

var keyword appeared in Java 10. This inspection can help to downgrade for backward compatibility with earlier Java versions.

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023