From the source, the Scanner(File) constructor wraps the File in a FileInputStream:
public Scanner(File source) throws FileNotFoundException {
this((ReadableByteChannel)(new...
Type: Posts; User: KevinWorkman
From the source, the Scanner(File) constructor wraps the File in a FileInputStream:
public Scanner(File source) throws FileNotFoundException {
this((ReadableByteChannel)(new...
Okay, gotcha. I assume that eclipse has its own JDK tucked away somewhere, but a JDK is simply the set of tools that compile your java code into bytecode (namely the javac tool). Compare that to the...
Strange. What jdk are you using?
Either way, you can download the source either as part of the full JDK or standalone from this page: Java SE Downloads
It depends on how your system is setup, but for example my JDK folder is:
C:\Program Files\Java\jdk1.7.0_07
In that directory, I have a src.zip, and inside that I have a Scanner.java file...
Your jdk folder should contain src.zip. Check that out, find the Scanner class, and you can see for yourself exactly what it does. I'd be curious to see what you find.