Java Blog

 
 
 
import java.io.File;

class  MakeDir
{
    public static void main(String[] args) 
    {
         String dirname=\"e:/Java Work/FileHandling/TermWork/MakeDir/a/b/\";
         File f = new File(dirname);

         if (f.mkdir())
         {
              System.out.println(\"Directory is Created\");
         }

         if (f.mkdirs())
         {
             System.out.println(\"Directories are Created\");
         }

    }
}

 
 
Didn't find what you were looking for? Find more on Program to make directory