Java noob doesn't understand importing
Hello, I am a java noob. I bought a book on how to learn and one thing I can't find in the book is what importing is and how you know what to import. At the beginning of basically all the sample code in the book it says "import static java.lang.System.out;" or "import java.io.File;"
or "import java.util.Scanner;" and basically I have no idea what I am supposed to import and when.
So yeah... Anything you say will probably be a learning experience for me because I basically know nothing. :P Any help is appreciated.
Re: Java noob doesn't understand importing
It gives you access to methods in Java packages. If you need certain functionality, you import say Java.util.Scanner. This gives you access to the Scanner class, and the methods inside used to read input.