IO-file-05 file folders created

. 1  Package com.bwie.io;
 2  
. 3  Import java.io.File;
 . 4  
. 5  / ** 
. 6  * create a directory
 . 7  *. 1, mkdir: parent directory to ensure the presence, absence creation fails
 . 8  * 2, mkdirs: parent directory can It does not exist
 . 9  * @author Allen17805272076
 10  *
 . 11   * / 
12 is  public  class DirDemo01 {
 13 is      public  static  void main (String [] args) {
 14          
15          File the dir = new new File ( "C: / the Users / Allen17805272076 / Desktop / SSM data / 33 is / text " );
 16          Boolean b = dir.mkdirs();
17         System.out.println(b);
18     }
19     
20 
21 }

 

Guess you like

Origin www.cnblogs.com/zwyzwy/p/11822756.html
Recommended