java create directory by path code example Example: java create folder new File("pathToFile").mkdir();