I am still a newbie java programmer. I was learning about Java IO and noticed that in the book as well as in the online tutorials they donot talk about scanner class. They always mention, creating input/output stream reader objects and use them to read or write.
I am very familiar with scanner class and after reading I started to think may be scanner is not the right way to read console input/files in java.
Please clarify my doubt and if you could point me to an easy to understand tutorial, it will be great. I have already looked up oracle docs and other popular websites. Read Herbert schildt’s book & the awful head first java book (barf..barf)
The scanner class is a special file reader which is optimized for reading text files. If you want to read other file types the scanner class is not optimal.
A good overview can be found here java i/o. The summary form there:
After reading this, you should look into Apache Commons I/O which give you some handy utility classes for i/o.