# Renaming a field

You can rename a field by modifying its declaration in the compilation unit in which it is declared. However, if you also want to update all references to it, do one of the following:

1. In a Java view presenting fields (for example in the Outline view) select a field.
2. From the view's pop-up menu, select Refactor > Rename or select Refactor > Rename from the global menu bar.

or

1. In a Java editor, select a reference to the field (or the field's declaration).
2. From the editor's pop-up menu, select Refactor > Rename or select Refactor > Rename from the global menu bar.

Refactoring actions
Refactoring dialogs
Java preferences
Package Explorer