My goal in "Java For Dummies" is to make the code as readable as possible.
If an example reads a single character (as in "Do you want to continue [y/n]?"), I'd like the code to contain a simple nextChar() call instead of a complicated workaround (such as myScanner.findWithinHorizon(".",0).charAt(0) ).
I can't afford to have my readers become sidetracked by unintuitive solutions.
I'm trying to write nextChar() and hasNextChar() methods and submit the code for inclusion in Java 7.
Surprisingly, this brings up all kinds of subtle issues, like trying to subclass the final Scanner class, trying to use methods in the proprietary sun.xxx.xxx packages, and writing a solution that's robust and efficient.
(Remember, if I submit this to the Java Community Process, I don't want to be embarrassed.)
In this session, Barry will present the problem that I'm trying to solve, and get your input on alternative solutions.
|