Java Tutorial


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 represent a bank account

  2. Define an array of ten String elements each containing an arbitrary string of the form “month/day/year”

  3. Program to show an example of using Abstract Class and Abstract Method

  4. An applet program to draw concentric circle in center of the canvas

  5. Program to show the use of Bitwise Operator (&) AND

  6. CORBA program for displaying the date and time of the server machine, client machine and the difference between these two date and time

  7. Program to declare and initialize Boolean variables and print them on the Standard Output Device

  8. An applet program to find maximum of three numbers using textField

  9. Program to show the use of Nested If-Else Statements

  10. Program using session tracking capability of Servlets, which displays information of current user session by HttpServletRequest object

  11. Program in CORBA which takes a long sentence from client (at least 7 words), passes to the server, server separates out each word and sends back

  12. Write a class whose objects holds a current value and have a method to add that value, printing the new value

  13. Program of insertion sort

  14. Create an interface coversions. Which have the following functions Inchestomillimeters(), hptowatts(),wattstohp(),poundstogram(),gramtopounds()

  15. Program to show the use of While Loop

  16. An applet program to add two numbers where data is entered in TextField

  17. Program to show some properties of StringBuffer object

  18. Program to display triangle of numbers

  19. Program of linear search

  20. Program to show the use of Logical or Boolean Negation i.e. NOT (!)

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