创建一系列分层目录
import java.io.IOException; /** N o w J a v a . c o m - 时 代 Java **/ import java.nio.file.FileSystems; import java.nio.file.Files; import java.nio.file.Path; public class Main { public static void main(String[] args) { Path newdir = FileSystems.getDefault().getPath("C:/folder1/", "statistics/win/prizes"); try { Files.createDirectories(newdir);// 来自 n o w j a v a . c o m - 时代Java } catch (IOException e) { System.err.println(e); } } }