11. Remove or add import statements
To remove unused import statements in any class.
On a PC, use ctrl + shift + o.
On a Mac, use command + shift + o.
There are also times when your class is missing import statements. For example, in a JUnit testing class, the import statement to allow the use of a call on assertEquals may be missing. In this case, use the keys as given above (ctrl-shift-o or command-shift-o). The necessary import statements will be added or, if there is a choice, a window will open giving you the choice. Neat!