mohitkumar gupta wrote:compiler is not asking for any input at run time
please tell how to complie and run it
compiler at runtime, this is new
Anyway, I compiled your program and it doesn't compiler as name is not declared anywhere. After fixing it, I compiled and run your program and there was no problem. The program asked me for password and then infinite series of inputs. Did you use any IDE to run this program??
Today I had same issue. Go to Java Control Panel . Go to Advanced tab. Go To Java console . Select Show console . Apply then Ok. Try to run your run the program using command line. The code will run fine.