Is there a way to make command text follow input?
<p>Say i want to print a text prompt in java, and then get input from user from System.in. But another thread can write to System.out and "takes down" the input but the text prompt stays up, which is normal.</p>

<blockquote>
  <p>Enter input here -><br>
  <code>&lt;waiting for input ...&gt;</code></p>
</blockquote>

<p>But if a thread writes something the following occurs:</p>

<blockquote>
  <p>Enter input here -><br>
  ...<br>
  ...<br>
  ...<br>
  Thread output here<br>
  ...<br>
  ...<br>
  <code>&lt;Waits for input here&gt;</code></p>
</blockquote>

<p>Is there any trick to "bind" the input with the prompt text?</p>
