62,614
社区成员
发帖
与我相关
我的任务
分享
File file = new File("E:/aa","hi.txt");
file.createNewFile()
创建失败,报错:Exception in thread "main" java.io.IOException: 系统找不到指定的路径。
File file = new File("E:\\aa\\","hi.txt");
if(!file.getParentFile().exists()){
file.getParentFile().mkdirs();
}
file.createNewFile();