Inspectopedia
 
2024.3

Variable type can be explicit

Info
New
Last modified: 03 December 2024

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

Example:

After the quick-fix is applied:

This inspection depends on the Java feature 'Local variable type inference', which is available since Java 10.