To extract a constant from an expression: Extracting a constant
- In a Java editor, select the expression that you want to extract to a constant
- Do one of the following:
- From the editor's pop-up menu, select Refactor > Extract Constant or
- From the menu bar, select Refactor > Extract Constant
Refactoring actions
Refactoring dialogs
Refactoring preferences