File file = new File("directory path");
if(file.exists()){
System.out.println("File Exists");
}else{
boolean wasDirecotyMade = file.mkdirs();
if(wasDirecotyMade)System.out.println("Direcoty Created");
else System.out.println("Sorry could not create directory");
}
One more thing .. check java documentation for mkdir() and mkdirs() .. they are different and better if you could find that yourself...
hope it helps ..