I
I
Ivan Sushkov2017-04-02 11:47:55
Java
Ivan Sushkov, 2017-04-02 11:47:55

How to enter data in one line using BufferedReader?

Good afternoon! Please let me know if the following input is possible:

String string = (new BufferedReader(new InputStreamReader(System.in))).readLine()

Maybe missed something. Or is such a design invalid?
PS: Only one parameter is read from the console, so it makes little sense to store a reference to an object.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2017-04-02
@jamesgoodwin

Possible, allowed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question