Key board shortcut for organizing imports in Eclipse is: Ctrl-Shift-o
Consider a package called Vehicles have Car, Truck and Bus classes in it. I imported whole package using following statement:
Consider that I am only using class Car. Now if I organize import (Ctrl-Shift-o), import statement will be changed to:
Eclipse prefers to import only the classes that are required.