The Inline refactoring lets you reverse the extract refactoring for variables and methods.
The animation below demonstrates how to inline a variable to a string:
To inline a variable/method:
Place a caret at the variable/method name.
Press Ctrl+Alt+N or from the main menu, select.
In the Inline dialog that corresponds to the selected variable or method, specify the inlining options. Preview and apply changes.
The Inline Variable refactoring replaces redundant variable usage with its initializer. This refactoring is opposite to Extract Variable.
Inline Method results in placing method's body into the body of its caller(s).