(Java) How to get user input without pressing the “enter” key [duplicate]
问题 This question already has answers here : How to read a single char from the console in Java (as the user types it)? (5 answers) Closed last year . I was curious and wanted to test this type of thing out in java. I looked it up online and couldn't really find anything that helped out in any of the questions I found; so I decided to ask it myself. In the example I wrote out, you're given a couple of options and you get user input and then stuff happens based off of user input using a switch