Click OK to complete the extraction and create the new method.
Tip:
When applying Extract Method, parameters and local variables in the selected code fragment become the parameters of the new method.
The code fragment cannot contain a return statement of the original method. An error message displays if you attempt to include a return statement in the code fragment.
The code fragment cannot modify more than one single local variable. An error message displays if you violate this restriction.
If the selected code fragment is repeated in several locations, it is your responsibility to replace these fragments in the appropriate locations with the proper method calls.