From the menu bar, select Window > Preferences.
In the left pane, expand the Java category and select Organize Imports.
The Organize Imports page defines the sorting order of import statements. In the Imports list, manage the list of package prefixes as follows:
In the Number of qualified imports before * is used field, type the number of import statements that are allowed to refer to the same package before <package prefix>.* is used. This number is called the import threshold.
Click OK when you are done.
Adding required import statements
Managing import statements
Organizing existing import statements