title: How to make Java console input dissapear after pressing enter
body: <p>I'm using the Scanner class to take some input from the user through the console. Whenever the user inputs something in the screen and presses enter the input stays on screen for example:</p>
  
  <p>This is the prompt
  // User writes command and presses enter</p>
  
  <ul>
  <li>command</li>
  <li>output of command goes here</li>
  </ul>
  
  <p>//Use writes command3</p>
  
  <ul>
  <li>command</li>
  <li>output of command goes here</li>
  <li>command3</li>
  <li>output of command3 goes here</li>
  </ul>
  
  <p>Is there anyway I can make the command entered not stay in the console after pressing enter?</p>
  
  <p>For example:</p>
  
  <p>//User writes command</p>
  
  <ul>
  <li>output of command goes here</li>
  </ul>