Moritz Groß
Moritz Groß

Reputation: 1470

IntelliJ: Replace method call with body

Is there a refactoring in IntelliJ where I can replace the call of a method with the body of the method. For example:

static int doubleValue(int x) {
    return 2 * x;
}

System.out.println(doubleValue(3));

becomes

 System.out.println(2 * 3);

Upvotes: 0

Views: 513

Answers (1)

y.bedrov
y.bedrov

Reputation: 6034

Yes, please use "Refactor | Inline Method"

Upvotes: 2

Related Questions