Extracting a method

To extract a method:

  1. In an editor, select a set of statements or an expression from a method body.

  2. Do one of the following:

    • From the pop-up menu in the editor, select Refactor > Extract Method.

    • From the menu bar, select Refactor > Extract Method.

Related concepts

Java development tools (JDT)

Related tasks

Overriding a method
Renaming a method

Related reference

Refactoring actions
Refactoring dialogs
Refactoring preferences
Extract method errors

Legal notices