Java 实例 - 递归创建目录
Java 教程
· 2019-02-10 23:44:09
以下实例演示了使用 File 类的 mkdirs() 实现递归创建目录 :
Main.java 文件
import java.io.File;
public class Main {
public static void main(String[] args) {
String directories = "D:\\a\\b\\c\\d\\e\\f\\g\\h\\i";
File file = new File(directories);
boolean result = file.mkdirs();
System.out.println("Status = " + result);
}
}
以上代码运行输出结果为:
Status = true
点击查看所有 Java 教程 文章: https://www.codercto.com/courses/l/12.html
Pro CSS and HTML Design Patterns
Michael Bowers / Apress / April 23, 2007 / $44.99
Design patterns have been used with great success in software programming. They improve productivity, creativity, and efficiency in web design and development, and they reduce code bloat and complexit......一起来看看 《Pro CSS and HTML Design Patterns》 这本书的介绍吧!