 <p>use this code:</p> <pre><code> public class KeyboardInput extends Thread{ Scanner sc= new Scanner(System.in); @Override public void run() { while(true) { sc.hasNext(); } } } </code></pre> <p>Then just call this when you want to start the input:</p> <pre><code>Thread t1= new Thread(new KeyboardInput); t1.start(); </code></pre> <p>Now you have a thread that reads inputs while the main thread is free to print to screen</p> <p>EDIT: be sure to only call the thread once!</p>