One of hundreds of answers available with our premium content service.
A: The key to creating an interactive command line interface in Java is to set up a continuous loop that reads the system input one line at a time. The example below captures the system input stream in an InputStreamReader and wraps that in a BufferedReader to read the input lines. It uses System.out to create a prompt and watches for a "quit" message to exit the loop.
… full answer hidden
Premium members click below for full answer
How can I make an interactive command line interface?
We love social media, but we do not expect you to create yet another public outpost on the Web.