Message from discussion Newbie seeking comments on StdinReader class
From: Roedy Green <see_webs...@mindprod.com.invalid>
Subject: Re: Newbie seeking comments on StdinReader class
Date: Sat, 10 Sep 2011 20:12:05 -0700
Organization: Canadian Mind Products
Reply-To: Roedy Green <see_webs...@mindprod.com.invalid>
Content-Type: text/plain; charset=us-ascii
X-Notice: Filtered by postfilter v. 0.8.2
X-Newsreader: Forte Agent 6.00/32.1186
On Mon, 5 Sep 2011 07:00:39 -0700 (PDT), anirudhbh...@yahoo.com wrote,
quoted or indirectly quoted someone who said :
>I am a Java newbie and I have created a class which reads input from
>Stdin. I want the class to silently block until the user enters the
>correct input. Here's what I have developed. I would appreciate
>expert comments on this, they way a seasoned professional would
>approach this problem. (Yes, I do realize that Java considers command
>line input old fashioned).
stdin blocks all by itself. You can do this more simply with
readLine. See http://mindprod.com/applet/fileio.html
to generate you a program to do it.
Roedy Green Canadian Mind Products
The modern conservative is engaged in one of man's oldest exercises in moral philosophy; that is,
the search for a superior moral justification for selfishness.
~ John Kenneth Galbraith (born: 1908-10-15 died: 2006-04-29 at age: 97)