Search code examples
javaintellij-ideajava-11

Variable extraction to var in IntelliJ IDEA


When extracting a variable (Ctrl+Alt+V) in IntelliJ IDEA with Java 11, I would like for the default to be that it is extracted to a var instead of the verbose type.

var home = "127.0.0.1";

instead of

String home = "127.0.0.1";

Is there a way to configure IntelliJ IDEA to do this?


Solution

  • JetBrains added this feature to IntelliJ 2019.1.1.

    variable extraction in IntelliJ 2019.1.1