How can I take a character input in java through cmd interface without asking the user to press enter. (the user doesn't have to press enter, the character should be taken as input as soon as he/she enters any character)
Asked
Active
Viewed 33 times
0
-
How would the stream know to stop reading characters? – Makoto Oct 09 '17 at 20:47
-
i want to take the first charcter entered as input – Saksham Oct 09 '17 at 20:48
-
That's not possible – Impulse The Fox Oct 09 '17 at 20:48
-
@ImpulseTheFox Actually it is possible, unfortunately this question can never be replied. Anyway if the emphasis of this question is not on reading a single character but how to stop reading characters without hitting "Enter", then this has been wrongly marked as duplicate. – user3437460 Oct 09 '17 at 21:33