Is there a Java equivalent to getchar?
<p>I have a simple client server program, wherein I have a problem with my menu:</p>

<pre><code>do {  
    System.out.println("---- MENU ----\n");  
    System.out.println("(drv) - List drives");  
    System.out.println("(pwd) - Current path");  
    System.out.println("(ls) - List files in a directory");  
    System.out.println("(quit) - Quit program\n");  
    System.out.print("Enter a command: ");  
    command = scanner.nextLine();  
    sendMessage(command);  
    message = (String)in.readObject();  
    System.out.println(message);  
    System.in.read();  
}while(!command.equals("quit"));`  
</code></pre>

<p>I want to print the result on the screen, wait until I press <kbd>Enter</kbd> and then show the menu again, so I use <code>System.in.read()</code>. My problem is that it works the first time, but if I choose another option it doesn't print anything:</p>

<blockquote>
  <p>---- MENU ----  </p>
  
  <p>(drv) - List drives<br>
  (pwd) - Current path<br>
  (ls) - List files in a directory<br>
  (quit) - Quit program  </p>
  
  <p>Enter a command: pwd<br>
  D:\Documents and Settings\asname\workspace_java\server  </p>
  
  <p>---- MENU ----  </p>
  
  <p>(drv) - List drives<br>
  (pwd) - Current path<br>
  (ls) - List files in a directory<br>
  (quit) - Quit program  </p>
  
  <p>Enter a command: ls</p>
</blockquote>

<p>Is there a method in Java similar to <code>getchar</code> that I could use instead?</p>
