The code snippet below shows how to create a directory:

 File td = new File("NewDirName");
td.mkdir();