I suspect Java authors are making performance assumptions:
Consider the following code:
public static void printArray(int[] array, PrintWriter writer) {
for(int i = 0; i < array.length; i++) {
writer.print(array[i]);
if(i != array.length - 1) writer.print(',');
}
}
, flush() . , . , - , flush .
, printf, format println, , , . , -, .
- ( ):
, , -. , . , , , .
, Java -. , ; API- native input , . , , API , .
< >
, , . .
autoflush, . autoflush , . , autoflush PrintWriter println format.