In your opinion. What input method is best?

By a few learn to write in Java. Keyboard data I enter Scanner , today my classmate said, must use "buffer" , and said that he like best.
And here I was wondering what input method is best in your opinion, what polzuites you ?
July 8th 19 at 16:26
3 answers
July 8th 19 at 16:28
Answer: no.

In Java, console input is hardly used and it is proposed to study only for training purposes.

About buffer:

It looks like this
BufferedReader reader = new BufferedReader(new an InputStreamReader(;
String s = reader.readLine();

I have this version (with the buffer) is more like: for file input, the difference will be small (for text):

BufferedReader reader = new BufferedReader(new FileReader("input.txt"));
String s = reader.readLine();

Here the discussion can be read, on a subject "That better?"
July 8th 19 at 16:30
Best - the one for this task is better suited classmate tells you stuff, usually without any difference, so use the one that comes to hand.
July 8th 19 at 16:32
Ispolzuu bufferedreader then useful

Find more questions by tags Java