1
私はJavaにはかなり慣れていますが、なぜこれが機能しないのかを理解したかったのです。なぜ、sys出力は完璧に動作しますが、バッファリングされた作者はしませんか?バッファリングされたライターとsys出力のプリント
The Determinant is: 5
The Determinant is: 3
�The Determinant is: 64
� �� ���The Determinant is: 270
������ ���The Determinant is: 0
�������� ����The Determinant is: 270
������ The Determinant is: 0
The Determinant is: 0
のSysプリントアウト出力:
Matrix read:
---------------------------------------
5
---------------------------------------
Matrix read:
---------------------------------------
2 3
---------------------------------------
5 9
---------------------------------------
Matrix read:
---------------------------------------
3 -2 4
---------------------------------------
-1 5 2
---------------------------------------
-3 6 4
---------------------------------------
私はちょうど(.txtファイルから)2/
//print the input matrix to the user
System.out.println("Matrix read: ");
System.out.println("------------------" +
"---------------------");
for (int i = 0; i < size; i++) {
for (int j = 0; j < size; j++) {
System.out.printf("%5d ", a[i][j]);
bw.write(a[i][j]);
bw.flush();
}
//print a blank line
System.out.println();
バッファ付きライターの出力の違いを理解しようとしています