xxxxxxxxxx
First Method
Press Ctrl+Alt+M
Second Method
from the main menu,
select Refactor
Extract
Method. In the dialog that opens, configure a method options, such as visibility, parameters, and so on. You can also change a name of the method if you need. Click OK
xxxxxxxxxx
Press Ctrl+Alt+M or from the main menu, select Refactor | Extract | Method. In the dialog that opens, configure a method options, such as visibility, parameters, and so on. You can also change a name of the method if you need. Click OK