2

Mainly a visual and user-friendliness issue, but I would still like to fix it. My code here with the user prompt and waiting for an entered string:

System.out.print("Enter a word or phrase: "); 

phrase = input.nextLine();

The functionality works fine and whenever you start typing, and the cursor moves after the ":" symbol, but I'm confused why the cursor doesn't automatically move there every time the loop repeats.

  • 2
    *"every time the loop repeats"* What loop? – user1803551 Oct 20 '14 at 06:59
  • This is dependent on the console. You can try [this](http://stackoverflow.com/questions/1001335/java-gotoxyx-y-for-console-applications). – user1803551 Oct 20 '14 at 07:04
  • Possible duplicate of [How to put input cursor after prompt java](http://stackoverflow.com/questions/31502176/how-to-put-input-cursor-after-prompt-java) – Tot Zam Mar 05 '17 at 16:11

0 Answers0