Eclipse is a wonderful and most powerful IDE to work with. If you have written a line of code and the imports for it is missing or say you have borrowed a piece of code and imports are missing, you do not need to manually remember or type the imports of the Classes being used, simple press "Ctrl + Shift + O" and all needed imports will be added to the class file.
By doing "Ctrl + Shift + O" you also remove any unwanted/unused imports that exist in your class file.
Example :
Let's say you copied a line "Data d = new Date();" and you see an error like
Multiple markers at this line
- Date cannot be resolved to a type
- Data cannot be resolved to a type
Press Ctrl + Shift + O you will get a pop-up dialog saying that Date class exists in two packages "com.sql.Date" and "com.util.Date" choose the appropriate and you would see that import statement is added just below package statement at the top. If imports have no resolution to do you would not get this popup and simply the imports will get added.

- Enable Spellcheck in eclipse workspace
- List of Eclipse versions and future releases (2020-09)
- INVALID FILE NAME: MUST CONTAIN ONLY [a-z0-9_.] Android Eclipse Error
- How to enable line numbers in Eclipse IDE
- How to Save Eclipse console logs in external log file
- How to Change Eclipse Default Web Browser
- Enable Eclipse dark mode
- Add imports in eclipse shortcut key combinations
- Eclipse version 32-bit or 64-bit check
- [Eclipse] Enable or Disable print margin line
- Eclipse Error : The Eclipse executable launcher was unable to locate its companion shared library.
- Eclipse: Updating Maven Project. Unsupported IClasspathEntry kind=4
- eclipse maven m2e : Cannot complete the install
- Eclipse : This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in
- Failed to load the JNI shared library jvm.dll
- [Eclipse] Syntax error, annotations are only available if source level is 1.5 or greater
- How to use Content Assist in Eclipse IDE
- How to Word wrap eclipse console logs width
- Eclipse : Workspace was written with an older version of the product and will be updated
- List of Code Snippets/Templates to Eclipse IDE
- How to make TextView Text Transparent [Android] - Android
- JSON Nest Objects Example: JSON Tutorial - Json-Tutorial
- Google translate in spreadsheet - Google
- SharePoint update append Required Field to display name of mandatory columns - SharePoint
- How to make a div tag clickable - Html
- Restore deleted Office 365 SharePoint group site - SharePoint
- Android : Neither user 10085 nor current process has android.permission.ACCESS_NETWORK_STATE - Android
- Android-Failed to install apk on device EOF Timeout Error - Android
- HTML5 HELLO WORLD Example - Html
- Calculate Area of Square - C-Program
- How to get the Android OS installed version programmatically - Android
- List of Eclipse IDE Versions and future releases : Mars and Neon - Eclipse
- [Eclipse] Syntax error, annotations are only available if source level is 1.5 or greater - Eclipse
- How to Generate Self-Signed OpenSSL certificate in three easy steps - HowTos
- Change Title text for Android Activity using java code - Android