You can rename a method by modifying its declaration in the compilation unit in which it is declared. However, if you also want to update all references to it, you must either:
or
Note 1: Renaming a method declared in an interface also renames (and updates all references to) all methods that are implementations of that method.
Note 2: When renaming a non-static method declared as public, package visible, or protected, all methods overriding it are also renamed and all references to them are updated.
Note 3: Renaming a static method or a private method updates references only to that method.
Extracting a method
Renaming method parameters
Override methods
Refactoring actions
Refactoring dialogs
Java preferences