Refactor | Extract Variable
Generally, this dialog is used to extract new variables. Depending on the language, there may be additional options, for example:
To make this dialog accessible for Java, you have to disable in-place refactoring in the editor settings.
The following is available only in the Ultimate edition of IntelliJ IDEA