Java Blog

 
 
 
import java.io.File;

class  MakeDir
{
    public static void main(String[] args) 
    {
         String dirname=\"e:/Java Work/FileHandling/TermWork/MakeDir/a/b/\";
         File f = new File(dirname);

         if (f.mkdir())
         {
              System.out.println(\"Directory is Created\");
         }

         if (f.mkdirs())
         {
             System.out.println(\"Directories are Created\");
         }

    }
}

    Related Post:
  1. Program to declare, initialize and print a 2D array of integers

  2. Program to compute the sum of the digits of a given integer number. eg: I/o=4 then O/p=4+3+2+1=10

  3. RMI based application for login validation based on data saved in text file stored on the server and will display appropriate message to the client..

  4. Program to show the use of Labeled Continue Statement

  5. Program to display text

  6. Program to show an example of getting at characters in a String

  7. An applet program to display Vertical Color Bar

  8. Program to show the use of Logical OR Operator (|) in If Statements

  9. Program that enabled applet calculator

  10. Program to compare Strings by compring successive corresponding characters, starting with the first character in each String

  11. Program of insertion sort

  12. Develop a game application in CORBA for which the player will guess a number between 1 to 100, which will be compared to the random number generated b

  13. Program to show an example of using initialization block to initialize the data members of a class

  14. Do the following for the Array Insert the element in the array,delete an element from the array,search for a particular element Create multiple thread

  15. Program to check the start and end of a String

  16. Program to show an example of using constructors in a class to initialize its data members

  17. An application that combines several classes and interface

  18. Program to read the ballots and count the votes cast for each candidate using an array variable count

  19. An applet program to display alternate filled and empty circle that to in row and column format

  20. Program to show the use of If Statement

 
 
Didn't find what you were looking for? Find more on Program to make directory