J
joealey2003
Hi all.
Every time you call a inputstream.read(), it stops the execution and
wait for the user input. How can i keep it running and check if the
user has typed something?
I tried :
if (System.in.available() > 0) but i need to read to change the
available value....
How can i do that?
I need something like a main loop control:
while(UserInputChar != 'S'){
//RUN
Thread.currentThread.sleep(5000);
}
//----------------------------------------------
Thanks.
Every time you call a inputstream.read(), it stops the execution and
wait for the user input. How can i keep it running and check if the
user has typed something?
I tried :
if (System.in.available() > 0) but i need to read to change the
available value....
How can i do that?
I need something like a main loop control:
while(UserInputChar != 'S'){
//RUN
Thread.currentThread.sleep(5000);
}
//----------------------------------------------
Thanks.