+ 2
How to input a character without pressing enter?
i want to input a character without pressing enter. i want if user presses any alphabet it should be accepted
2 Réponses
+ 2
Try this:
while True {
char in = (char) System.in.read();
System.out.println("You pressed " + in);
}
+ 1
java