67,513
社区成员
发帖
与我相关
我的任务
分享
package com.file.Test;
import java.io.File;
public class Test {
public static void main(String[] args) {
System.out.println("run Test");
Test t = new Test();
}
public Test(){
System.out.println("run...");
try{
File myFilePath = new File("E:\\test");
if(!myFilePath.exists())
{
myFilePath.mkdir();
}
}catch (Exception e) {
System.out.println("新建目录操作出错");
e.printStackTrace();
}
}
}