Answer the question
In order to leave comments, you need to log in
Can strings from System.in go to BufferedReader(InputStreamReader) "discontinuously"?
For example: The System.in input should be a million lines (or even more). Then while is done until null is encountered . But can it be that null gets hit before a million rows are finished? For example, due to the low byte feed rate of System.in input? Will he wait for a new "portion" himself, or will the cycle end ahead of time?
BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
String bufferedValue = bufferRead.readLine();
while(bufferedValue != null) {
// actions
bufferedValue = bufferRead.readLine();
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question