In my java project, during the process of refactoring my code, I see a lot of redundant packages. Eclipse marks them in light yellow as shown in the image below
What is the suggested practice of handling hese ? Do these redundant packages have any performance impact and if yes, would be interested in knowing how.
In eclipse there's a handy shortcut Ctrl+Shift+o which will organize your imports and remove unused.
Unused imports have a trivial impact on the compiler. It's not a big deal however it's distracting and best practice is to remove them.
Also it's prefered to use imports like this
import java.util.Map;
import java.util.List;
over this
import java.util.*;
using star will import all packages from util which you don't need in most scenarios...