In QBasic, you might learn it in your first ten minutes, but I've yet to see Java code that displays text, accepts user input, and processes according the the input recieved. I have been looking for some time with no clues. Can anyone hint at the right track to follow, or perhaps a small example that asks for a number and then displays whether the number is <> 50 ? Is there some kind of input method, or do you somehow reset args?
That does the trick after importing java.io.* and changing szBuffer to sBuffer. I've seen System.in before, and am barely familiar with Buffered readers. Never seen them associated with prompting user input though. And since I haven't studied them heavily yet, I didn't pick up on it. Many Thanks!
One thing to realize is that there has been a change in emphasis on how user input is usually received. In the "old days", inputs came either from input files, or were typed to the console. But nowadays, while input files are still very common, the "console" has often been replaced with some sort of GUI widget. So Java texts tend to skip over how to use System.in, and instead jump to how to create Frames etc. and write event handlers to react to input that way. Which of course is a lot more complicated for the programmer, but done correctly it's often nicer for the user. (Or at least, it's what today's users often tend to expect.) Obviously there are times when System.in is what you should use since it's so easy, and it's unfortunate that this isn't emphasized in more Java texts. Thanks for bringing this question up; it's a good one.