To be generalized, Let's take an example like this.
I have a method something like this.
public void mymethod(int param1, String param2){
//do something
}
And I want to change it into something like this.
public void mymethod(int param1, String param2, String param3){
//do something
}
Is there a preferred way to do that with intellij without breaking usages?
You can do the followings with intellij.
With Refactor
-> Change Signature
menu, you can:
To go to Refactor
-> Change Signature
menu
In the editor, place the cursor within the name of the method whose signature you want to change. Do one of the following:
For more, please have a look at here