M
M
Mikhri2020-11-08 00:37:42
Java
Mikhri, 2020-11-08 00:37:42

Is there an equivalent in Java to the html "value" attribute (for text fields) that would "prefill" the Scanner or BufferedReader on console input?

I want that when reading text from the console, it will be pre-filled with some kind of template that would be duplicated in this very console, as printed outside.

So that the console gets approximately the same functionality that the value attribute gives to html text fields (i.e. so that the entered text remains when the user enters, and not as a placeholder). Only here instead of a text field - Java Scanner or BufferedReader

Are there ready-made solutions for this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Orkhan, 2020-11-08
@Mikhri

Here, here they gave an answer to your question
https://stackoverflow.com/questions/22518594/java-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question