1. first option
- when you don’t import the class you get an error
- you can just click on the error and import the class
example
- Add this line of code in the start method:
2. You will get an error:
3. and dubbel-click on Import ‘PrintStream’ (java.io); eclipse automatically adds the code on the right place:
2. second option
You add the import code manual.
- The name of the code can be found here: https://docs.oracle.com/…… or I will mention it in the tutorial
- This is the place where you have to add the code:
EXAMPLE