title: Java Scanner Input, Test if Button pressed
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1066318/how-to-read-a-single-char-from-the-console-in-java-as-the-user-types-it">How to read a single char from the console in Java (as the user types it)?</a>  </p>
  </blockquote>
  
  
  
  <p>I'm programming in Java and I was wondering if they're was a way to "wait" until a button is pressed before proceeding to the next part of the program.  I am running this in Terminal. 
  i.e.</p>
  
  <pre><code>Scanner in = new Scanner(System.in);
  .
  .
  .
  System.out.print("Something");
  /* Wait until a button has been pressed */ 
  System.out.println("Something Else");
  </code></pre>
  
  <p>Something like in.next() would wait until you've press something then press enter.
  Is there a way you could wait until any button has been press (or the mouse clicked?) and then proceed to the next line.  Preferably having the input not echoed to the screen (if that's possible).<br>
  So the output would be:
      Something
      Something Else</p>
  
  <p>Thanks for all your time
  Any help is appreciated.</p>