This article covers how to remove unused imports in eclipse and make our project clean and avoid unnecessary loading.
we may have many unused imports in our java file and we find it laborious to remove each line of imports one by one. It would be great if we get an option to remove all the unused imports in one shot.
Eclipse helps us to remove all the unused imports at once. We will show that how it works below.
Click on the java page where we have unused imports or place the cursor in any one of the imports and click on Organize Imports.
Also, there is a keyboard shortcut for the same,
Click on Ctrl+Shift+O
Clicking on Organize button will remove all the unused imports in the Java file.
This article covered a tip to remove unwanted imports in our Java class file. We hope this content is useful. Happy Automating.