Miletone

Rp0 / Rp1.000.000

Showing posts with label [JAVA] MEMBUAT FOLDER.. Show all posts
Showing posts with label [JAVA] MEMBUAT FOLDER.. Show all posts

Monday, January 11, 2021

[JAVA] MEMBUAT FOLDER.

 import java.io.*;

/**

 *

 * @author ANDI

 */

public class InputFile {

    public static void main (String [] args){

        /*File f = new File("D:\\stream.doc");

        FileOutputStream out;

        PrintStream p;

        try {

            out = new FileOutputStream("D:\\stream.doc");

            p = new PrintStream(out);

            p.println("Ini String yang di tulis ke file");

            p.println("bla bla bla");

            p.close();

        } catch (Exception e) {

            System.err.println("Error Writting to file");

        }*/

       String dirname = "D:\\test";

      File d = new File(dirname);

      

      // Create directory now.

      d.mkdirs();

        System.out.println("Data yang anda input, selesai");

    }

}