Java examples for File Path IO:Directory Create
Create directory
import java.io.*; public class Main { public static void main(String[] args) { /*from ww w . j av a 2 s. c o m*/ //create file object File dir = new File("C://Folder//DemoDirectory"); boolean isDirectoryCreated = dir.mkdir(); if(isDirectoryCreated) System.out.println("Directory created successfully"); else System.out.println("Directory was not created successfully"); } }