一、三种构造函数
public class demo {
public static void main(String[] args) {
File file = new File("D:\\资料\\温度测试.txt");
File fileOne = new File("D:\\", "资料\\温度测试.txt");
File directory = new File("D:\\");
File fileTwo = new File(directory, "资料\\温度测试.txt");
二、三种新建文件的方法
public class demo {
public static void main(String[] args) {
File file1 = new File("D:\\资料1\\温度测试");
System.out.println(file1.mkdir());
File file2 = new File("D:\\资料2\\温度测试");
System.out.println(file2.mkdirs());
File file3 = new File("D:\\资料\\温度测试.txt");
try {
System.out