File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Herb, the use of Scanner class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Herb, the use of Scanner class" Watch "Herb, the use of Scanner class" New topic

Herb, the use of Scanner class

James Chegwidden
Ranch Hand

Joined: Oct 06, 2002
Posts: 201

Got a copy of Java A beginner guide:

Question on using Scanner class:

1. Why not mention it with using file and keyboard input? Most intro to java texts 1.5 use Scanner. You do mention in Complete Reference

You cover for/each and enum.

Same can be made for printf. Most new Java 1.5 intro textbooks use this. You only mention briefly here.

So if you have an intro to programming book- Your competion uses it -why don't you.

I teach programming at the college level- I find your books good. But this seems to me to be a glaring omission in teaching Java to beginners.

Your thoughts please.
[ April 23, 2005: Message edited by: James Chegwidden ]

Author and Instructor, my book
Herb Schildt
Ranch Hand

Joined: Oct 01, 2003
Posts: 253

I do not extensively cover Scanner or printf in Java: A Beginner's Guide because of length concerns, and because both are a bit more advanced than I was comfortable putting in a "first book" on Java.

Of course, both Scanner and printf will seem easy to us more experienced programmers, but neither are intuitive for beginnners.

Also, for readers without a background in C/C++, printf is difficult to learn. Frankly, I view the addition of printf to Java mostly as a means of streamlining the conversion of C/C++ code to Java.

BTW: I cover both Scanner and printf(and much much more)in considerable detail in my book Java: The Complete Reference, J2SE 5 Edition

For my latest books on Java, including Introducing JavaFX 8 Programming, see
I agree. Here's the link:
subject: Herb, the use of Scanner class
It's not a secret anymore!