How To Wait For User Input In Java