Hi all,
Am trying to create the file that contains some attributes and parameters to that attributes . and also want to give permissions to modify , rename, and delete like this .please give me hints to do this task . i wrote a program to create the empty file .
below is that
import java.io.*; public class CreateFile { private static void doCreate() { File file = new File("NewFile1.txt"); boolean success = false; try { success = file.createNewFile(); } catch (IOException e) { e.printStackTrace(); } if (success) { System.out.println("File did not exist and was created.\n"); } else { System.out.println("File already exists.\n"); } } public static void main(String[] args) { doCreate(); } }