Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Java: how to create a directory

Java: how to create a directory
{filelink=7958}

import java.io.File;
public class Ex_Rep
{
  public static void main(String[] argv) throws Exception
  	{
    // Create a directory on the C: drive
    boolean result = (new File("c:/exemple")).mkdir();
    System.out.println (result==true?"Directory created":"Error"); 
  }
}

Users who found this page were searching for:

  • iterate over keys in python dictionary
  • os.system perl

No comments yet.

Leave a Comment