Java user login without printing a new line

Like, in Java, I can accept user input without printing a new line. I want to give a hint and reset the carriage return cursor if the input is invalid. Console.readLine Scanner.nextInt and BufferedReader.read all seem to print a new line when the enter key is pressed.

I want the cursor to remain on when the user presses enter to send the input.

Thank.

+3
source share
1 answer

You will have to redraw the entire screen or use the curses library .

. , , , ... , , " " " ", - " ".

, , , HTML , , ... , , , --, , ; -)

. .

0

All Articles