标签:ati throws 文件夹 out creat ace html create print
import java.io.File;
import java.io.IOException;
public class FileDemo2 {
public static void main(String[] args) throws IOException {
//1.创建文件
File file = new File("E:\\Workpace\\java.txt");
System.out.println(file.createNewFile());
//2.创建文件夹
File file1 = new File("E:\\Workpace\\java");
System.out.println(file1.mkdir());
//3.创建多级文件夹
File file2 = new File("E:\\Workpace\\javaweb\\Html");
System.out.println(file2.mkdirs());
}
}
标签:ati throws 文件夹 out creat ace html create print
原文地址:https://www.cnblogs.com/codegzy/p/14723531.html