我有一個名爲fields的二維數組,我需要能夠保存其內容(彩色首字母縮寫)。 try {
BufferedWriter outFile = new BufferedWriter(new FileWriter("Drawing_NEW.csv"));
for (int y = 0; y < totalY; y++) {
for (int x = 0; x < tota
我使用的緩衝筆者嘗試輸入文本到記事本,這是我來什麼碼了文本, import java.util.Scanner;
import java.io.*;
public class FileSample {
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
Str
對於需要使用UTF-8編碼附加到文本文件的項目。 在我的研究,我發現了兩個可能性: BufferedWriter out = new BufferedWriter(
new OutputStreamWriter(new FileOutputStream("file.txt), "UTF-8")
)
這會寫信給我的UTF-8的文件,但它會覆蓋它,而不是附加給它,如果它已經存在。 然後我