一、判断文件是否存在,不存在则创建File file = new File("d:\test.txt");if (!file.exists()) {try {file.createNewFile();} catch