Extract Method

How

  • Pick a name for the new method.
  • Move extracted code into the new method.
  • Call the new method from the point of extraction.

Uses

Replace Temp with Query

One simple way to extract methods is by replacing local variables.