/**
* mkdir - creates directory if the parent directory/drive exists
* return TRUE if the directory is created successfully
* FALSE if the directory already exists
*/
File newDir = new File("C:\\NEW");
System.out.println(newDir + " created successfully : " + newDir.mkdir());
/**
* mkdir cannot create nested sub directories.
* for that we need to use mkdirs.
*/
newDir = new File("C:\\NEW2\\NEW2_SUB\\NEW2_SUB_SUB");
System.out.println(newDir + " created successfully : " + newDir.mkdir());
C:\NEW created successfully : true
C:\NEW2\NEW2_SUB\NEW2_SUB_SUB created successfully : false
C:\NEW2\NEW2_SUB\NEW2_SUB_SUB created successfully : true