So it sounds like you are asking how to write a program that runs in a terminal emulator window, and which has one (or more than one) thread that updates the window, while another thread waits for the user to type commands.
If I'm wrong, then stop right here, and learn how to write a GUI app (e.g., with JavaFX or with Swing) instead. If you really need a console app, then read on.
The heart of the problem is that normally, a terminal emulator window is not controlled by your program.
When you type commands to a typical console application, you expect to be able to see what you type (that's called echo), and you expect to be able to edit what you're typing (e.g, to back up and fix mistakes).
Not only is it not your code that echoes characters and lets you edit the line, it's not even your process doing it: Something else--usually some component of the operating system--is handling the keypress events, doing the editing, updating the terminal window, and feeding your program input a whole line at a time.
To really take control, you have to open your program's console in a special mode (see, https://en.wikipedia.org/wiki/POSIX_terminal_interface)
Then your program can read the key-presses character-by-character, and it will be the sole source of characters going out to the terminal, and that plus knowledge of the escape sequences that position the cursor will give you the power to completely control what appears on the screen...
...but at a very low level.
Third party libraries exist that give you a higher-level of functionality. They can handle the line editing for you (assuming you want line-by-line input), and they can split the screen into different regions, and let your different threads write to them like they were little mini-consoles. They can do other things too...
The question, what's a good library to use? already has answers here:
What's a good Java, curses-like, library for terminal applications?