How to rename a class and its corresponding file in Eclipse?

Solution 1:

Just right click on the class in the project explorer and select "Refactor" -> "Rename". That it is is under the "Refactor" submenu.

Solution 2:

Shift + Alt + r (Right click file -> Refactor -> Rename) when cursor is on class name. The file and constructors will be also changed.

Solution 3:

Right click file -> Refactor -> Rename.

Solution 4:

You can rename classes or any file by hitting F2 on the filename in Eclipse. It will ask you if you want to update references. It's really as easy as that :)