Forums Register Login

Help me

+Pie Number of slices to send: Send
I am having problem with the following code.

char c = (char) input.read();

After the above line is executed .. when i try to take another input...it does not prompt for the input.

that is
char d = ( char) input.read();

I am not finding any prompt for the second input. Is there anything like flush which i used to have in C/C++.

Arnab
+Pie Number of slices to send: Send
What is the "input" object? If you are reading from standard input (System.in) you may be getting more data than you expect. Try echoing the characters back to standard output as you read them in.
+Pie Number of slices to send: Send
And please use specific topics - most people look for help.

And some will not answer to unspecific topics, unformatted code, and fantasy names.
Don't MAKE me come back there with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 818 times.
Similar Threads
copying file without messing up the content.
How to use PipedReader,pipeWriter, i has error output
Trouble setting CLASSPATH variable in windows 2000 prof.
Reader Object
bufferedReader
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 02:47:56.