import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
public class Chinese {
public static void main(String[] args) {
int start = Integer.parseInt("4e00",16);
int end = Integer.parseInt("9fa5",16);
StringBuilder stringBuilder = new StringBuilder();
for (int i = start; i < end; i++) {
stringBuilder.append((char) i);
stringBuilder.append('\n');
}
try {
// 文件保存到项目目录下
File file = new File("text.txt");
file.createNewFile();
FileWriter fileWriter = new FileWriter(file);
fileWriter.write(stringBuilder.toString());
fileWriter.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}