How can I remove unused import and variable on save action in eclipse. I have option Ctrl+Shift+O. but it remove only unused import. I want to remove unused
Here is how you can do it:
In Eclipse Go to Window -> Preferences-> Java -> Editor -> Save Actions and click on Perform the selected actions on save: Organize imports.
Enjoy!